<template>
  <el-dialog
    class="eldialog"
    v-loading="loading"
    :visible.sync="visible"
    :title="title"
    :close-on-click-modal="false"
    append-to-body
    top="2vh"
    width="95%"
    :modal-append-to-body="true"
    :close-on-press-escape="false"
    @close="onClosed"
  >
    <div style="height: 800px; width: 100%; overflow: auto">
      <el-card class="box-card" style="overflow: auto">
        <el-form
          ref="personBaseForm"
          :model="personForm"
          :rules="personRules"
          style="width: 100%"
        >
          <div style="width: 75%; float: left;height: 100%;">
            <el-tabs
              v-model="activeName"
              type="border-card"
              style="min-height: 798px"
            >
              <el-tab-pane label="基本信息（一）" name="first">
                <table
                  class="el-table__body el-table--border ltp-table border"
                  style="width: 99.9%; border-collapse: collapse"
                >
                  <tr>
                    <th>姓名<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!--  v-if="personForm.sf_sfzh_sh == '1'" -->
                      <el-input
                        placeholder="请输入"
                        v-model="personForm.xingming"
                        readonly
                        @focus="getMessage('xingming')"
                      >
                      </el-input>
                      <!-- <el-input placeholder="请输入" v-model="personForm.xingming" v-else
                                              @blur="cadreInfoAlterUpdate('xingming')"
                                              @focus="getMessage('xingming')"></el-input> -->
                    </td>
                    <th>性别<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="xingbiePopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('GB2261')">
                                              <commonDictRadio ref="xingbieSlot" @popoverCallBack="popoverCallBack">
                                              </commonDictRadio> -->
                      <el-input
                        @focus="getMessage('xingbie_dm')"
                        v-model="personForm.xingbie"
                        slot="reference"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                    <th>出生年月<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <el-date-picker
                        v-model="personForm.csny"
                        type="month"
                        format="yyyy.MM"
                        value-format="yyyy.MM"
                        placeholder="请选择"
                        style="width: 100%"
                        :picker-options="checkTime"
                        @focus="getMessage('csny')"
                        @change="cadreInfoAlterUpdate('csny')"
                        readonly
                        disabled
                      ></el-date-picker>
                    </td>
                    <td
                      rowspan="4"
                      colspan="2"
                      style="text-align: center; width: 132px"
                    >
                      <!-- <el-upload class="avatar-uploader" :action="uploadUrl"
                                              :show-file-list="false" :on-success="handleAvatarSuccess"
                                              :before-upload="beforeAvatarUpload"> -->
                      <img
                        v-if="personForm.zhaopian"
                        :src="personForm.zhaopian"
                        class="avatar"
                        style="width: 128px; height: 160px"
                      />
                      <!-- <i v-else class="el-icon-plus avatar-uploader-icon"
                                                  style="width: 128px; height: 160px"></i> -->
                      <!-- </el-upload> -->
                    </td>
                  </tr>
                  <tr>
                    <th>民族<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="minzuPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('GB3304')">
                                              <commonDictRadio ref="minzuSlot" @popoverCallBack="popoverCallBack">
                                              </commonDictRadio> -->
                      <el-input
                        v-model="personForm.minzu_mc"
                        slot="reference"
                        @focus="getMessage('minzu_dm')"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                    <th>籍贯<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="jiguanPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('jiguan')">
                                              <treeDictRadio ref="jiguanSlot" @popoverCallBack="popoverCallBack">
                                              </treeDictRadio> -->
                      <el-input
                        v-model="personForm.jiguan"
                        @focus="getMessage('jiguan_dm')"
                        slot="reference"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                    <th>出生地<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="chushengdiPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('chushengdi')">
                                              <treeDictRadio ref="chushengdiSlot" @popoverCallBack="popoverCallBack">
                                              </treeDictRadio> -->
                      <el-input
                        v-model="personForm.chushengdi"
                        slot="reference"
                        @focus="getMessage('chushengdi_dm')"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                  </tr>
                  <tr>
                    <th>政治面貌<span style="color: red">*</span></th>
                    <td colspan="7" class="ltpAudit">
                      <!-- <el-input v-model="personForm.rudangxinxi" placeholder="请选择" hidden
                                              style="display:none" /> -->
                      <el-input
                        v-model="personForm.rudangxinxiForLook"
                        placeholder="请选择"
                        readonly
                      />
                    </td>
                    <th>入党时间<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-date-picker readonly hidden v-model="personForm.rdsj" type="month"
                                              format="yyyy.MM" value-format="yyyy.MM" placeholder="请选择"
                                              :picker-options="checkTime" style="width: 100%;display:none">
                                          </el-date-picker> -->
                      <el-input
                        v-model="personForm.rdsjForLook"
                        placeholder="请选择"
                        readonly
                      />
                    </td>
                  </tr>
                  <tr>
                    <th>参加工作时间<span style="color: red">*</span></th>
                    <td colspan="7" class="ltpAudit">
                      <el-date-picker
                        v-model="personForm.cjgzsj"
                        type="month"
                        format="yyyy.MM"
                        value-format="yyyy.MM"
                        placeholder="请选择"
                        style="width: 100%"
                        :picker-options="checkTime"
                        @focus="getMessage('cjgzsj')"
                        @change="cadreInfoAlterUpdate('cjgzsj')"
                        readonly
                        disabled
                      ></el-date-picker>
                    </td>
                    <th>健康状况<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <div style="width: 100px; display: inline-block">
                        <!-- <el-popover ref="jiankangPopover" placement="bottom-start" width="300"
                                                  trigger="click" @show="popoverClick('GB2261D')">
                                                  <commonDictRadio ref="jiankangSlot"
                                                      @popoverCallBack="popoverCallBack"></commonDictRadio> -->
                        <el-input
                          v-model="personForm.jiankang"
                          slot="reference"
                          @focus="getMessage('jiankang_dm')"
                          placeholder="请点击选择"
                          readonly
                        />
                        <!-- </el-popover> -->
                      </div>
                      <!-- <el-button style="float: right;margin-right: 10px" type="primary" plain
                                              size="small" @click="centerDialogVisible = true"
                                              v-show="personForm.jiankang !== '健康' && personForm.jiankang !== null && personForm.jiankang !== ''">
                                              原因
                                          </el-button> -->
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="4">
                      学历学位<span style="color: red">*</span>
                    </th>
                    <th rowspan="2">全日制<br />教育</th>
                    <th colspan="1">学历</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.qrzxl_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <th rowspan="2">毕业院校系<br />及专业</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.qrzxlxx_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr>
                    <th colspan="1">学位</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.qrzxw_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.qrzxwxx_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="2">在职教育</th>
                    <th colspan="1">学历</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.zzxl_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <th rowspan="2">毕业院校系<br />及专业</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.zzxlxx_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr>
                    <th colspan="1">学位</th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.zzxw_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        v-model="personForm.zzxwxx_zg"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr hidden>
                    <th>
                      工作单位及职务职级（全称）<span style="color: red"
                        >*</span
                      >
                    </th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        v-model="personForm.zhiwu_quancheng"
                        readonly
                        placeholder="请选择"
                        iconfont
                      />
                    </td>
                  </tr>
                  <tr>
                    <th>
                      现工作单位及职务职级（简称）<span style="color: red"
                        >*</span
                      >
                    </th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        v-model="personForm.zhiwu_jiancheng"
                        readonly
                        placeholder="请选择"
                        iconfont
                      />
                    </td>
                  </tr>
                  <tr>
                    <th>现职务层次<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <el-input
                        :value="
                          personForm.zwcc == null
                            ? ''
                            : personForm.zwcc == ''
                            ? ''
                            : personForm.zwcc + '（' + personForm.zwcc_sj + '）'
                        "
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <th>员额法官检察官职务</th>
                    <td colspan="3" class="ltpAudit">
                      <el-input
                        :value="
                          personForm.yezwcc_mc == null
                            ? ''
                            : personForm.yezwcc_mc == ''
                            ? ''
                            : personForm.yezwcc_mc +
                              '（' +
                              personForm.yezwcc_sj +
                              '）'
                        "
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                    <th>现职级<span style="color: red">*</span></th>
                    <td colspan="5" class="ltpAudit">
                      <el-input
                        :value="
                          personForm.zjcc_mc == null
                            ? ''
                            : personForm.zjcc_mc == ''
                            ? ''
                            : personForm.zjcc_mc +
                              '（' +
                              personForm.zjcc_sj +
                              '）'
                        "
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr>
                    <th>简历<span style="color: red">*</span></th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        type="textarea"
                        :rows="11"
                        readonly
                        placeholder="请选择"
                        v-model="personForm.jianli"
                      >
                      </el-input>
                    </td>
                  </tr>
                </table>
              </el-tab-pane>
              <el-tab-pane label="基本信息（二）" name="second">
                <table
                  class="el-table__body el-table--border ltp-table border"
                  style="width: 99.9%; border-collapse: collapse"
                >
                  <tr style="height: 116px">
                    <th>奖励情况综述<span style="color: red">*</span></th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        type="textarea"
                        :rows="3"
                        placeholder="请选择"
                        v-model="personForm.jl"
                        readonly
                      >
                      </el-input>
                    </td>
                  </tr>
                  <tr style="height: 116px">
                    <th>惩戒情况综述<span style="color: red">*</span></th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        type="textarea"
                        :rows="3"
                        placeholder="请选择"
                        v-model="personForm.cf"
                        readonly
                      >
                      </el-input>
                    </td>
                  </tr>
                  <tr style="height: 116px">
                    <th>年度考核综述<span style="color: red">*</span></th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        type="textarea"
                        :rows="3"
                        v-model="personForm.kaohe"
                        readonly
                        placeholder="请选择"
                      />
                    </td>
                  </tr>
                  <tr>
                    <th>家庭主要成员<br />及重要<br />社会关系</th>
                    <td colspan="13" style="overflow: auto" valign="top">
                      <family
                        ref="dialogFamily"
                        :gllb="
                          this.personForm.person_id
                            ? this.personForm.gllb_dm
                            : ''
                        "
                      ></family>
                    </td>
                  </tr>
                </table>
              </el-tab-pane>
              <el-tab-pane label="其他信息" name="third">
                <table
                  class="el-table__body el-table--border ltp-table border"
                  style="width: 99.9%; border-collapse: collapse"
                >
                  <tr>
                    <th>是否选调<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <el-radio-group
                        v-model="personForm.shifouxuandiao"
                        @change="cadreInfoAlterUpdate('shifouxuandiao')"
                        disabled
                      >
                        <el-radio :label="1">是</el-radio>
                        <el-radio :label="0">否</el-radio>
                      </el-radio-group>
                    </td>
                    <th>
                      选调时间<span
                        v-show="personForm.shifouxuandiao == '1'"
                        style="color: red"
                        >*</span
                      >
                    </th>
                    <td colspan="4" class="ltpAudit">
                      <el-date-picker
                        v-model="personForm.xuandiaoriqi"
                        type="month"
                        format="yyyy.MM"
                        value-format="yyyy.MM"
                        placeholder="请选择"
                        style="width: 100%"
                        disabled
                        readonly
                        :picker-options="checkTime"
                        @focus="getMessage('xuandiaoriqi')"
                        @change="cadreInfoAlterUpdate('xuandiaoriqi')"
                      >
                      </el-date-picker>
                    </td>
                    <th>保留待遇<span style="color: red">*</span></th>
                    <td colspan="4" class="ltpAudit">
                      <!-- <el-popover ref="baoliudaiyuPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('XZ91')">
                                              <commonDictRadio ref="baoliudaiyuSlot"
                                                  @popoverCallBack="popoverCallBack"></commonDictRadio> -->
                      <el-input
                        v-model="personForm.baoliudaiyumingcheng"
                        slot="reference"
                        @focus="getMessage('baoliudaiyumingcheng')"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                  </tr>
                  <tr>
                    <th>是否考录<span style="color: red">*</span></th>
                    <td colspan="3" class="ltpAudit">
                      <el-radio-group
                        v-model="personForm.sfkl"
                        @change="cadreInfoAlterUpdate('sfkl')"
                        disabled
                      >
                        <el-radio :label="1">是</el-radio>
                        <el-radio :label="0">否</el-radio>
                      </el-radio-group>
                    </td>
                    <th>
                      考录时间<span
                        v-show="personForm.sfkl == 1"
                        style="color: red"
                        >*</span
                      >
                    </th>
                    <td colspan="4" class="ltpAudit">
                      <el-date-picker
                        disabled
                        readonly
                        v-model="personForm.klsj"
                        type="month"
                        format="yyyy.MM"
                        value-format="yyyy.MM"
                        placeholder="请选择"
                        style="width: 100%"
                        :picker-options="checkTime"
                        @focus="getMessage('klsj')"
                        @change="cadreInfoAlterUpdate('klsj')"
                      >
                      </el-date-picker>
                    </td>
                    <th>两年基层工作经历<span style="color: red">*</span></th>
                    <td
                      colspan="4"
                      style="border-right: none; padding-left: 10px"
                      class="ltpAudit"
                    >
                      <el-radio-group
                        v-model="personForm.lngzjl_bz"
                        @change="cadreInfoAlterUpdate('lngzjl_bz')"
                        disabled
                      >
                        <el-radio :label="1">是</el-radio>
                        <el-radio :label="0">否</el-radio>
                      </el-radio-group>
                    </td>
                  </tr>
                  <tr>
                    <th>公务员级别</th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="gzjbPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('ZB134')">
                                              <commonDictRadio ref="gzjbSlot" @popoverCallBack="popoverCallBack">
                                              </commonDictRadio> -->
                      <el-input
                        v-model="personForm.gzjb"
                        @focus="getMessage('gzjb_dm')"
                        slot="reference"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                    <th>专业技术类公务员任职资格</th>
                    <td colspan="4" class="ltpAudit">
                      <!-- <el-popover ref="zyjsPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('ZB139')">
                                              <treeDictRadio ref="zyjsSlot" @popoverCallBack="popoverCallBack">
                                              </treeDictRadio> -->
                      <el-input
                        v-model="personForm.zyjs_mingcheng"
                        slot="reference"
                        @focus="getMessage('zyjs_dm')"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                    <lengthService
                      ref="lengthServiceRef"
                      @update="getWageInfo(salaryForm.person_id)"
                    ></lengthService>
                    <th>归侨侨眷</th>
                    <td
                      colspan="4"
                      style="border-right: none; padding-left: 10px"
                      class="ltpAudit"
                    >
                      <el-radio-group
                        disabled
                        v-model="personForm.qiaojuan"
                        @change="cadreInfoAlterUpdate('qiaojuan')"
                      >
                        <el-radio :label="1">是</el-radio>
                        <el-radio :label="0">否</el-radio>
                      </el-radio-group>
                    </td>
                  </tr>
                  <tr>
                    <th>成长地</th>
                    <td colspan="3" class="ltpAudit">
                      <!-- <el-popover ref="chengzhangdiPopover" placement="bottom-start" width="300"
                                              trigger="click" @show="popoverClick('chengzhangdi')">
                                              <treeDictRadio ref="chengzhangdiSlot"
                                                  @popoverCallBack="popoverCallBack"></treeDictRadio> -->
                      <el-input
                        v-model="personForm.chengzhangdi"
                        slot="reference"
                        @focus="getMessage('chengzhangdi_dm')"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </el-popover> -->
                    </td>
                  </tr>
                  <tr>
                    <th>熟悉领域</th>
                    <td colspan="13" class="ltpAudit">
                      <!-- <div @click="popoverClick('DB225')"> -->
                      <el-input
                        v-model="personForm.sxly"
                        slot="reference"
                        placeholder="请点击选择"
                        readonly
                      />
                      <!-- </div> -->
                      <sxly ref="sxlyRef" @setSxly="setSxly"></sxly>
                    </td>
                  </tr>
                  <tr style="height: 116px">
                    <th>代表委员情况综述</th>
                    <td colspan="13" class="ltpAudit">
                      <el-input
                        :rows="6"
                        type="textarea"
                        v-model="personForm.ry_dbwy_zs"
                        slot="reference"
                        readonly
                      />
                    </td>
                  </tr>
                </table>
                <div style="width: 100%"></div>
              </el-tab-pane>
            </el-tabs>
          </div>
          <div style="width: 25%; float: left;height:100%">
            <el-tabs
              v-model="activeName1"
              type="border-card"
              style="min-height: 798px"
            >
              <el-tab-pane label="管理信息" name="rightTab">
                <div style="height: 498px">
                  <table
                    class="el-table__body el-table--border ltp-table-right border"
                    style="width: 100%; border-collapse: collapse"
                  >
                    <tr>
                      <th>身份证号<span style="color: red">*</span></th>
                      <td>
                        <!-- @dblclick="updateIdCard" -->
                        <div class="ltpAudit">
                          <el-input
                            v-model="personForm.sfzh"
                            placeholder="请选择"
                            :readonly="true"
                            v-if="personForm.sf_sfzh_sh == '1'"
                          />
                          <el-input
                            v-model="personForm.sfzh"
                            placeholder="请选择"
                            :readonly="true"
                            v-else
                            @change="checkIdCard"
                          />
                        </div>
                      </td>
                      <td style="width: 25px">
                        <i
                          v-if="personForm.sf_sfzh_sh == '1'"
                          title="身份证号已核实，不可修改"
                          class="ym-custom ym-custom-check-circle"
                          style="color: green"
                        ></i>
                        <i
                          v-else
                          title="未核实"
                          class="ym-custom ym-custom-help-circle"
                          style="color: orange"
                        ></i>
                      </td>
                    </tr>
                    <tr>
                      <th>手机号</th>
                      <td>
                        <el-input
                          readonly
                          v-model="personForm.shouji"
                          class="ltpAudit"
                          placeholder="请输入"
                          @blur="cadreInfoAlterUpdate('shouji')"
                        />
                      </td>
                      <td style="width: 25px">
                        <i
                          title="未校核"
                          class="ym-custom ym-custom-help-circle"
                          style="color: orange"
                        ></i>
                      </td>
                    </tr>
                    <tr>
                      <th>
                        公务员登记<br />时间<span style="color: red">*</span>
                      </th>
                      <td>
                        <el-date-picker
                          readonly
                          disabled
                          class="ltpAudit"
                          v-model="personForm.gwydjsj"
                          type="month"
                          format="yyyy.MM"
                          value-format="yyyy.MM"
                          placeholder="请选择"
                          style="width: 100%"
                          :picker-options="checkTime"
                          @focus="getMessage('gwydjsj')"
                          @change="cadreInfoAlterUpdate('gwydjsj')"
                        >
                        </el-date-picker>
                      </td>
                    </tr>
                    <tr>
                      <th>职位类别<span style="color: red">*</span></th>
                      <td>
                        <div class="ltpAudit">
                          <!-- <el-popover ref="zhiweiPopover"
                                                      :popper-options="{ boundariesElement: 'body', gpuAcceleration: true }"
                                                      placement="bottom" width="300" trigger="click"
                                                      @show="popoverClick('XZ93')">
                                                      <treeDictRadio ref="zhiweiSlot"
                                                          @popoverCallBack="popoverCallBack"></treeDictRadio> -->
                          <el-input
                            v-model="personForm.zhiweileibie_mingcheng"
                            slot="reference"
                            @focus="getMessage('zhiweileibie_dm')"
                            placeholder="请点击选择"
                            readonly
                          />
                          <!-- </el-popover> -->
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>人员类别<span style="color: red">*</span></th>
                      <td>
                        <div class="ltpAudit">
                          <!-- <el-popover ref="rylbPopover" placement="bottom" width="300"
                                                      trigger="click" @show="popoverClick('ZB125')">
                                                      <commonDictRadio ref="rylbSlot"
                                                          @popoverCallBack="popoverCallBack"></commonDictRadio> -->
                          <el-input
                            v-model="personForm.rylb"
                            slot="reference"
                            placeholder="请点击选择"
                            @focus="getMessage('rylb_dm')"
                            readonly
                          />
                          <!-- </el-popover> -->
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>编制类型<span style="color: red">*</span></th>
                      <td>
                        <div class="ltpAudit">
                          <!-- <el-popover ref="bzlxPopover" placement="bottom" width="300"
                                                      trigger="click" @show="popoverClick('ZB135')">
                                                      <commonDictRadio ref="bzlxSlot"
                                                          @popoverCallBack="popoverCallBack"></commonDictRadio> -->
                          <el-input
                            v-model="personForm.bzlx"
                            slot="reference"
                            @focus="getMessage('bzlx_dm')"
                            placeholder="请点击选择"
                            readonly
                          />
                          <!-- </el-popover> -->
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>管理类别<span style="color: red">*</span></th>
                      <td>
                        <div class="ltpAudit">
                          <!-- <el-popover 
                                                      ref="gllbPopover" 
                                                      placement="bottom" 
                                                      width="300"
                                                      trigger="click" 
                                                      @show="popoverClick('DB201')"
                                                  >
                                                      <treeDictRadio 
                                                          ref="gllbSlot"
                                                          @popoverCallBack="popoverCallBack"
                                                      ></treeDictRadio> -->
                          <el-input
                            v-model="personForm.gllb"
                            slot="reference"
                            @focus="getMessage('gllb_dm')"
                            placeholder="请点击选择"
                            readonly
                          />
                          <!-- </el-popover> -->
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>专业技术职务</th>
                      <td>
                        <!-- @dblclick="getProfession" -->
                        <div class="ltpAudit">
                          <el-input
                            v-model="personForm.zyjszw"
                            readonly
                            placeholder="请选择"
                            @change="cadreInfoAlterUpdate('zyjszw')"
                          />
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>熟悉专业有何专长</th>
                      <td>
                        <el-input
                          disabled
                          v-model="personForm.zhuanyejishu"
                          readonly
                          @focus="getMessage('zhuanyejishu')"
                          class="ltpAudit"
                          placeholder="请输入"
                          @blur="cadreInfoAlterUpdate('zhuanyejishu')"
                        />
                      </td>
                    </tr>

                    <tr>
                      <th>编制关系所在单位<span style="color: red">*</span></th>
                      <td>
                        <!-- @dblclick="chooseParentModule('xz')" -->
                        <div class="ltpAudit">
                          <el-input
                            v-model="personForm.xingzheng_jg_mingcheng"
                            @focus="getMessage('xingzheng_jg_id')"
                            readonly
                            placeholder="请选择"
                          />
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>统计关系所在单位<span style="color: red">*</span></th>
                      <td>
                        <!-- @dblclick="chooseParentModule('tj')" -->
                        <div class="ltpAudit">
                          <el-input
                            v-model="personForm.tongji_jg_mingcheng"
                            @focus="getMessage('tongji_jg_id')"
                            readonly
                            placeholder="请选择"
                          />
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>工资关系所在单位<span style="color: red">*</span></th>
                      <td>
                        <!-- @dblclick="chooseParentModule('gz')" -->
                        <div class="ltpAudit">
                          <el-input
                            v-model="personForm.gongzi_jg_mingcheng"
                            @focus="getMessage('gongzi_jg_id')"
                            readonly
                            placeholder="请选择"
                          />
                        </div>
                      </td>
                    </tr>
                    <tr v-if="this.isDeleted == 'queryInactivityPerson'">
                      <th>管理状态<span style="color: red">*</span></th>
                      <td>
                        <div class="ltpAudit">
                          <el-select
                            disabled
                            v-model="personForm.glzt_dm"
                            @change="cadreInfoAlterUpdate('glzt_dm')"
                          >
                            <el-option label="暂存人员" value="0"></el-option>
                            <el-option label="现职人员" value="1"></el-option>
                            <el-option label="退休人员" value="3"></el-option>
                            <el-option label="历史人员" value="4"></el-option>
                          </el-select>
                        </div>
                      </td>
                      <td style="width: 25px"></td>
                    </tr>
                  </table>
                </div>
                <div style="height: 200px"></div>
                <div style="width: 100%">
                  <el-button
                    style="float: right; margin: 10px 10px 10px 0"
                    type="danger"
                    size="medium"
                    @click="closedRmb"
                    >取消
                  </el-button>
                </div>
              </el-tab-pane>
            </el-tabs>
          </div>
        </el-form>
      </el-card>
    </div>
    <!-- 分管工作 -->
    <inChargeJob ref="dialogInChargeJobs"></inChargeJob>
    <education ref="dialogEducation" @onEducationed="onEducationed"></education>
    <post ref="dialogPost" @onPosted="onPosted"></post>
    <YEpost ref="dialogYEPost" @onYEPosted="onYEPosted"></YEpost>
    <rank ref="dialogRank" @onRanked="onRanked"></rank>
    <assessment
      ref="dialogAssessment"
      @onAssessmented="onAssessmented"
    ></assessment>
    <resumeDetail
      ref="dialogResumeDetail"
      @onResumeDetail="onResumeDetail"
    ></resumeDetail>
    <reward ref="dialogReward" @onReward="onReward"></reward>
    <deputy ref="dialogDeputy" @onDbwyqk="onDbwyqk"></deputy>
    <!-- 代表委员情况 -->
    <punishment
      ref="dialogPunishment"
      @onPunishment="onPunishment"
    ></punishment>
    <orgChooseTree
      ref="dialogTree"
      @onModuleChoosed="onModuleChoosed"
    ></orgChooseTree>
    <dictionaryTree
      ref="dialogdictionaryTree"
      @onGetback="onGetback"
    ></dictionaryTree>
    <dictionaryTreeForzq
      ref="dialogdictionaryTreeForzq"
      @onGetback="onGetback"
    ></dictionaryTreeForzq>
    <archives ref="dialogArchives" @onArchives="onArchives"></archives>
    <attach ref="dialogAttach" @onArchives="onArchives"></attach>
    <train ref="dialogTrain" @onArchives="onArchives"></train>
    <zzmm ref="dialogZzmm" @onZzmm="onZzmm"></zzmm>
    <job ref="dialogJob"></job
    ><!-- @onJob="onJob" -->
    <profession
      ref="dialogProfession"
      @onProfession="onProfession"
    ></profession>
    <idCardUpdate ref="dialogIdCard" @onGetIdCard="onGetIdCard"></idCardUpdate>
    <el-dialog
      title="健康状况描述"
      :visible="centerDialogVisible"
      width="30%"
      height="500px"
      center
      class="eldialog"
      :close-on-click-modal="false"
      append-to-body
      @close="centerDialogVisible = false"
    >
      <el-form style="height: 130px">
        <el-row
          style="background: #fff; padding: 2px 10px; margin-top: 10px"
          class="pt-2 pb-2 pl-3 pr-3"
        >
          <el-col :span="24">
            <el-form-item label="健康状况描述" label-width="120px">
              <el-input
                v-model="personForm.jiankang_xx"
                type="textarea"
                style="width: 95%"
                :rows="5"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span
        slot="footer"
        class="dialog-footer"
        style="display: inline-block; margin-bottom: 10px"
      >
        <el-button @click="centerDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="cadreInfoAlterUpdate('jiankang')"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </el-dialog>
</template>

<script>
import store from "@/store";
import webapp from "@/config/webapp";
import archives from "@/views/datacentersz/person/personArchives/archives";
import assessment from "@/views/datacentersz/person/personAssessment/assessment";
import attach from "@/views/datacentersz/person/personAttach/attach";
import deputy from "@/views/datacentersz/person/personDeputy/deputy";
import education from "@/views/datacentersz/person/personEducation/education";
import inChargeJob from "@/views/datacentersz/person/inChargeJob/index"; //分管工作
import job from "@/views/datacentersz/person/personJob/job";
import lengthService from "@/views/datacentersz/person/lengthService/lengthService";
import post from "@/views/datacentersz/person/personPost/post";
import profession from "@/views/datacentersz/person/personProfession/profession";
import punishment from "@/views/datacentersz/person/personPunishment/punishment";
import rank from "@/views/datacentersz/person/personRank/rank";
import resumeDetail from "@/views/datacentersz/person/personResume/resumeDetail";
import reward from "@/views/datacentersz/person/personReward/reward";
import train from "@/views/datacentersz/person/personTrain/train";
import YEpost from "@/views/datacentersz/person/personYEPost/YEpost";
import idCardUpdate from "@/views/datacentersz/person/idCardUpdate";
import family from "@/views/datacentersz/person/personFamily/familyRmb";
import sxly from "@/views/datacentersz/person/sxly/index"; //熟悉领域
import zzmm from "@/views/datacentersz/person/zzmmAddOrUpdate";
import orgChooseTree from "@/views/datacentersz/common/orgChooseTreeLazy";
import dictionaryTree from "@/views/datacentersz/common/dictionaryTree";
import dictionaryTreeForzq from "@/views/datacentersz/common/dictionaryTreeForzq";
import commonDictRadio from "@/views/datacentersz/common/commonDictRadio";
import treeDictRadio from "@/views/datacentersz/common/treeDictRadio";
import {
  addGatherData,
  updateGatherData,
  getPerson,
  updatePerson,
  getTableItemNote,
  saveOrUpdateWage,
  getWage,
  getWageInfo,
  updateWageInfo,
  cadreInfoAlter,
  addBlankPerson,
} from "@/api/datacentersz/person/person";
import { getFamilyList } from "@/api/datacentersz/person/personFamily";
import { getDictionary } from "@/api/datacentersz/dictionary/dictionary";
import { updateJobOutputCheck } from "@/api/datacentersz/person/personJob";
import { updateBaseDeputy } from "@/api/datacentersz/person/personDeputy";
import { getPersonDetail } from "@/api/datacentersz/dataCheck";
import { showLoading, hideLoading } from "@/util/loading";

const vaildateSfzh = (rule, value, callback) => {
  const personJsons = {
    userId: store.getters.user_id.toString(),
    token: store.getters.token.toString(),
    system: "datacenter",
    data: {
      sfzh: value,
    },
  };
  getPerson(personJsons).then((response) => {
    if (response.code === 200621) {
      callback();
    } else {
      if (response.resultdata.sfzh === value) {
        callback();
      } else {
        callback(new Error("身份证号已存在，请核实后添加"));
      }
    }
  });
};

export default {
  name: "personRmb",
  components: {
    profession,
    post,
    YEpost,
    rank,
    assessment,
    resumeDetail,
    reward,
    deputy,
    job,
    education,
    orgChooseTree,
    family,
    zzmm,
    dictionaryTree,
    punishment,
    idCardUpdate,
    dictionaryTreeForzq,
    commonDictRadio,
    treeDictRadio,
    train,
    archives,
    attach,
    lengthService,
    sxly,
    inChargeJob,
  },
  data() {
    return {
      personEdit: "",
      person_id: "",
      activeName: "first",
      activeName1: "rightTab",
      activeName2: "first",
      tableData: [],
      messagealert: "",
      loading: false,
      jobIds: "",
      gxjg: "",
      title: "",
      uploadUrl: webapp.zpUploadUrl || "",
      visible: false,
      type: "",
      zzmmForback: "",
      zzmm_dmForback: "",
      dedp_dm: "",
      dsdp_dm: "",
      checkTime: {
        disabledDate: (time) => {
          // 不能小于当前日期
          return time.getTime() > Date.now() - 8.64e7; // 加- 8.64e7则表示包当天
        },
      },
      personWage: "",
      personForm: {
        zhaopian: "",
        person_id: "",
        rudangxinxi: "",
        rudangxinxiForLook: "",
        xingming: "",
        xingbie: "",
        xingbie_dm: "",
        csny: "",
        minzu_dm: "",
        minzu_mc: "",
        jiguan: "",
        jiguan_dm: "",
        chushengdi: "",
        chushengdi_dm: "",
        chengzhangdi: "",
        chengzhangdi_dm: "",
        zhiweileibie_mingcheng: "",
        jiankang_xx: "",
        rdsj: "",
        rdsjForLook: "",
        cjgzsj: "",
        klsj: "",
        jiankang: "",
        sfzh: "",
        gwydjsj: "",
        xuandiaoriqi: "",
        zhiwu_quancheng: "",
        zhiwu_jiancheng: "",
        tongji_jg_id: "",
        tongji_jg_mingcheng: "",
        xingzheng_jg_id: "",
        xingzheng_jg_mingcheng: "",
        gongzi_jg_id: "",
        gongzi_jg_mingcheng: "",
        zzmm: "",
        zzmm_dm: "",
        dedp_dm: "",
        dedp: "",
        dsdp_dm: "",
        dsdp: "",
        dedp_rdsj: "",
        dsdp_rdsj: "",
        shouji: "",
        zyjszw: "",
        zhuanyejishu: "",
        qrzxl_zg: "",
        qrzxlxx_zg: "",
        qrzxw_zg: "",
        qrzxwxx_zg: "",
        zzxl_zg: "",
        zzxlxx_zg: "",
        zzxw_zg: "",
        zzxwxx_zg: "",
        zwcc_dm: "",
        zwcc: "",
        zwcc_sj: "",
        zjcc_dm: "",
        zjcc_mc: "",
        zjcc_sj: "",
        lxzwcj_sj: "",
        zwlb: "",
        zwlb_dm: "",
        gllb: "",
        gllb_dm: "",
        rylb: "",
        rylb_dm: "",
        baoliudaiyudaima: "",
        zhiweileibie_dm: "",
        lngzjl_bz: "",
        jinjinpingshikaohe: "",
        sfkl: "",
        shifouxuandiao: "",
        bzlx: "",
        bzlx_dm: "",
        jianli: "",
        jianli_jingjian: "",
        gzjb_dm: "",
        gzjb: "",
        zyjs_dm: "",
        zyjs_mingcheng: "",
        jl: "",
        cf: "",
        kaohe: "",
        zw_sj: "",
        baoliudaiyumingcheng: "",
        personBase: "1",
        personJob: "1",
        personEducation: "1",
        personPost: "1",
        personRank: "1",
        personResume: "1",
        personAssessment: "1",
        personPunishment: "1",
        personReward: "1",
        personFamily: "1",
        personProfession: "1",
        personYEPost: "1",
        yezwcc_banben: "",
        yezwcc_bianma: "",
        yezwcc_mc: "",
        yezwcc_sj: "",
        glnx: "",
        glnx_qssj: "",
        glnx_kcqssj: "",
        glnx_kcjzsj: "",
        glnx_kc: "",
        glnx_shuoming: "",
        qiaojuan: "",
      },
      personWageForm: {
        gz_id: "",
        ry_id: "",
        ry_sfzh: "",
        gz_dy: "",
        gz_lqgzys: "",
        gz_jb: "",
        gz_dc: "",
        gz_sfbjdy: "",
        gz_zwgz: "",
        gz_zjgz: "",
        gz_gzx_bt: "",
        gz_shx_bt: "",
        gz_zfbt: "",
        gz_wybt: "",
        gz_gwjt_bt: "",
        gz_sxbjt_bt: "",
        gz_wfzg_bt: "",
        gz_qn_bt: "",
        gz_nnycx_jj: "",
        gz_lgsj_jj: "",
        gz_jswm_jj: "",
        gz_ndjxkh_jj: "",
        gz_yefgjcgkh_jj: "",
        gz_pskh_jj: "",
        yq_jbt: "",
        przgwy_jbt: "",
        qtjlx_jbt: "",
        xzgz_jbt: "",
        jcjx_jbt: "",
        jczq_jbt: "",
        jcjb_jbt: "",
        zfw_jbt: "",
        jwjcw_jbt: "",
        xf_jbt: "",
        sj_jbt: "",
        baomi_jbt: "",
        aqsc_jbt: "",
        sfzl_jbt: "",
        fjgg_jbt: "",
        jcyzl_jbt: "",
        gjtyqt_jbt: "",
        shf_jbt: "",
        wxj_jbt: "",
        qt_jbt: "",
        gz_bzxx: "",
      },
      //工资信息
      salaryForm: {
        person_id: "", //人员主键
        gongzi_jg_id: "", //工资关系所在单位ID
        gongzi_jg_bianma: "", //工资关系所在单位CODE
        gongzi_jg_mingcheng: "", //工资关系所在单位NAME
        glzj: "", //工龄增加合计（月）
        gljs: "", //工龄减少合计（月）
        glsm: "", //工龄增减说明
        sfwf: "", //是否具备无房补贴发放条件
        jtdq_banben: "", //津补贴发放执行的地区标准
        jtdq_bianma: "", //津补贴发放执行的地区标准
        jtdq_mc: "", //津补贴发放执行的地区标准
        dszncsny: "", //独生子女出生日期（独生子女填写）
        sfftjgz: "", //是否副厅级单位执行高定级别工资（是否属于对应一级调研员政策范围人员）
        sykssj: "", //试用(见习、初期)开始时间
        syzzsj: "", //试用(见习、初期)终止时间
        zzdjsj: "", //转正(期满)定级时间
        jzzwcc_banben: "", //军转干部转业前军队职务层次--版本
        jzzwcc_bianma: "", //军转干部转业前军队职务层次--CODE
        jzzwcc_mc: "", //军转干部转业前军队职务层次--NAME
        jzzjcc_banben: "", //军转干部转业后享受的职级层次--版本
        jzzjcc_bianma: "", //军转干部转业后享受的职级层次--CODE
        jzzjcc_mc: "", //军转干部转业后享受的职级层次--NAME
        gzbeizhu: "", //备注
      },
      salaryFormPro: {},
      personRules: {
        xingming: [
          { required: true, message: "姓名不可为空", trigger: "blur" },
        ],
        sfzh: [
          { required: true, message: "身份证号不可为空", trigger: "blur" },
          {
            validator: vaildateSfzh,
            message: "身份证号已存在，请核实后添加",
            trigger: "change",
          },
        ],
        zhiwu_jiancheng: [
          { required: true, message: "请维护职务信息", trigger: "blur" },
        ],
      },
      xingbieOptions: [],
      minzuOptions: [],
      jiankangOptions: [],
      zzmmOptions: [],
      dedpOptions: [],
      dsdpOptions: [],
      rylbOptions: [],
      zwlbOption: [],
      bldyOption: [],
      glztOptions: [],
      gllbOptions: [],
      bzlxOptions: [],
      educationId: [],
      field: "",
      props: {
        // 配置项（必选）
        value: "id",
        label: "name",
        children: "children",
      },
      centerDialogVisible: false,
      restaurants: [{ value: "健康" }, { value: "一般" }, { value: "较差" }],
      labelAll: [],
      valueAll: [],
      isDeleted: "",
    };
  },
  mounted() {},
  watch: {
    salaryForm: {
      handler(newVal) {
        if (this.salaryFormPro !== newVal && this.salaryForm.person_id) {
          for (let i in newVal) {
            if (this.salaryFormPro[i] !== newVal[i]) {
              if (i !== "glsm") {
                this.labelAll.push(i);
                this.valueAll.push(newVal[i]);
                if (
                  i == "gongzi_jg_bianma" ||
                  i == "gongzi_jg_mingcheng" ||
                  i == "jtdq_bianma" ||
                  i == "jtdq_mc" ||
                  i == "jzzwcc_bianma" ||
                  i == "jzzwcc_mc" ||
                  i == "jzzjcc_bianma" ||
                  i == "jzzjcc_mc"
                ) {
                  if (this.labelAll.length > 1 && this.valueAll.length > 1) {
                    this.updateWageInfo(this.labelAll, this.valueAll);
                    this.labelAll = [];
                    this.valueAll = [];
                  }
                } else {
                  this.updateWageInfo(this.labelAll, this.valueAll);
                  this.labelAll = [];
                  this.valueAll = [];
                }
              }
            }
          }
        }
      },
      deep: true,
    },
  },
  computed: {
    /* 转树形数据 */
    optionData() {
      let cloneData = JSON.parse(JSON.stringify(this.jiankangOptions)); // 对源数据深度克隆
      return cloneData.filter((father) => {
        // 循环所有项，并添加children属性
        let branchArr = cloneData.filter(
          (child) => father.code === child.parentId
        ); // 返回每一项的子级数组
        branchArr.length > 0 ? (father.children = branchArr) : ""; //给父级添加一个children属性，并赋值
        return father.parentId === -1; //返回第一层
      });
    },
  },
  methods: {
    onTop() {
      this.$emit("onTop", this.person_id);
    },
    onBehind() {
      this.$emit("onBehind", this.person_id);
    },
    onDbwyqk(obj) {
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: obj,
      };
      updateBaseDeputy(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
          this.initData(this.person_id, this.personEdit, this.title);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async updateWageInfo(label, value) {
      const codeJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.salaryForm.person_id,
        },
      };
      if (label.length == 1 && value.length == 1) {
        this.$set(codeJsons.data, label[0], value[0]);
      } else if (label.length > 1 && value.length > 1) {
        label.forEach((item, index) => {
          this.$set(codeJsons.data, label[index], value[index]);
        });
      }
      await updateWageInfo(codeJsons)
        .then((response) => {
          if (response.result) {
            this.$message.success(response.message);
          } else {
            this.$message.error(response.message);
          }
          this.getWageInfo(this.salaryForm.person_id);
        })
        .catch(() => {
          this.getWageInfo(this.salaryForm.person_id);
        });
    },
    async getWageInfo(person_id) {
      return;
      const codeJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: person_id,
        },
      };
      await getWageInfo(codeJsons).then((response) => {
        if (response.result) {
          if (
            response.resultdata &&
            response.resultdata != {} &&
            response.resultdata != undefined
          ) {
            for (let i in this.salaryForm) {
              this.salaryForm[i] = response.resultdata[i];
            }
            this.salaryFormPro = JSON.parse(JSON.stringify(this.salaryForm));
          }
        }
      });
    },
    getMessage(type) {
      const codeJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          tableName: "person",
          itemName: type,
        },
      };
      getTableItemNote(codeJsons)
        .then((response) => {
          if (response.result) {
            this.messagealert = response.resultdata;
          } else {
            this.$message.error(response.message);
          }
        })
        .catch(() => {});
    },
    wageInfoAlterUpdate(type, value) {
      if (!this.personForm.sfzh) {
        this.$message.warning("请先维护身份证号!");
        return;
      }
      const codeJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        gz_id: this.personWageForm.gz_id,
        ry_id: this.personForm.person_id,
        data: {
          itemValue: value,
          itemName: type,
        },
      };
      saveOrUpdateWage(codeJsons)
        .then((response) => {
          if (response.result) {
            this.$message.success(response.message);
            this.getPersonWage();
          } else {
            this.$message.error(response.message);
          }
        })
        .catch(() => {});
    },
    popoverCallBack(row, dict) {
      if (dict == "GB2261") {
        if (row.detailCode == "") {
          this.personForm.xingbie = "";
          this.personForm.xingbie_dm = "";
        } else {
          this.personForm.xingbie = row.detailName;
          this.personForm.xingbie_dm = row.detailCode;
        }
        this.$refs.xingbiePopover.showPopper = false;
        this.cadreInfoAlterUpdate("xingbie");
      } else if (dict == "XZ93") {
        if (row.detailCode == "") {
          this.personForm.zhiweileibie_dm = "";
          this.personForm.zhiweileibie_mingcheng = "";
        } else {
          this.personForm.zhiweileibie_mingcheng = row.detailName;
          this.personForm.zhiweileibie_dm = row.detailCode;
        }
        this.$refs.zhiweiPopover.showPopper = false;
        this.cadreInfoAlterUpdate("zhiweileibie");
      } else if (dict == "DB100") {
        if (this.DB100Value == "jiguan") {
          if (row.detailCode == "") {
            this.personForm.jiguan = "";
            this.personForm.jiguan_dm = "";
          } else {
            this.personForm.jiguan = row.detailFullName;
            this.personForm.jiguan_dm = row.detailCode;
          }
          this.$refs.jiguanPopover.showPopper = false;
          this.cadreInfoAlterUpdate("jiguan");
        } else if (this.DB100Value == "chushengdi") {
          if (row.detailCode == "") {
            this.personForm.chushengdi = "";
            this.personForm.chushengdi_dm = "";
          } else {
            this.personForm.chushengdi = row.detailFullName;
            this.personForm.chushengdi_dm = row.detailCode;
          }
          this.$refs.chushengdiPopover.showPopper = false;
          this.cadreInfoAlterUpdate("chushengdi");
        } else if (this.DB100Value == "jintie") {
          if (row.detailCode == "") {
            this.salaryForm.jtdq_mc = "";
            this.salaryForm.jtdq_bianma = "";
          } else {
            this.salaryForm.jtdq_mc = row.detailFullName;
            this.salaryForm.jtdq_bianma = row.detailCode;
          }
          this.$refs.jintiePopover.showPopper = false;
        } else {
          if (row.detailCode == "") {
            this.personForm.chengzhangdi = "";
            this.personForm.chengzhangdi_dm = "";
          } else {
            this.personForm.chengzhangdi = row.detailFullName;
            this.personForm.chengzhangdi_dm = row.detailCode;
          }
          this.$refs.chengzhangdiPopover.showPopper = false;
          this.cadreInfoAlterUpdate("chengzhangdi");
        }
      } else if (dict == "GB3304") {
        if (row.detailCode == "") {
          this.personForm.minzu_mc = "";
          this.personForm.minzu_dm = "";
        } else {
          this.personForm.minzu_mc = row.detailFullName;
          this.personForm.minzu_dm = row.detailCode;
        }
        this.$refs.minzuPopover.showPopper = false;
        this.cadreInfoAlterUpdate("minzu");
      } else if (dict == "ZB125") {
        if (row.detailCode == "") {
          this.personForm.rylb = "";
          this.personForm.rylb_dm = "";
        } else {
          this.personForm.rylb = row.detailFullName;
          this.personForm.rylb_dm = row.detailCode;
        }
        this.$refs.rylbPopover.showPopper = false;
        this.cadreInfoAlterUpdate("rylb");
      } else if (dict == "ZB135") {
        if (row.detailCode == "") {
          this.personForm.bzlx = "";
          this.personForm.bzlx_dm = "";
        } else {
          this.personForm.bzlx = row.detailFullName;
          this.personForm.bzlx_dm = row.detailCode;
        }
        this.$refs.bzlxPopover.showPopper = false;
        this.cadreInfoAlterUpdate("bzlx");
      } else if (dict == "DB201") {
        if (row.detailCode == "") {
          this.personForm.gllb = "";
          this.personForm.gllb_dm = "";
        } else {
          this.personForm.gllb = row.detailFullName;
          this.personForm.gllb_dm = row.detailCode;
        }
        this.$refs.gllbPopover.showPopper = false;
        this.cadreInfoAlterUpdate("gllb");
      } else if (dict == "XZ91") {
        if (row.detailCode == "") {
          this.personForm.baoliudaiyumingcheng = "";
          this.personForm.baoliudaiyudaima = "";
        } else {
          this.personForm.baoliudaiyumingcheng = row.detailFullName;
          this.personForm.baoliudaiyudaima = row.detailCode;
        }
        this.$refs.baoliudaiyuPopover.showPopper = false;
        this.cadreInfoAlterUpdate("baoliudaiyu");
      } else if (dict == "ZB134") {
        if (row.detailCode == "") {
          this.personForm.gzjb = "";
          this.personForm.gzjb_dm = "";
        } else {
          this.personForm.gzjb = row.detailFullName;
          this.personForm.gzjb_dm = row.detailCode;
        }
        this.$refs.gzjbPopover.showPopper = false;
        this.cadreInfoAlterUpdate("gzjb");
      } else if (dict == "ZB139") {
        if (row.detailCode == "") {
          this.personForm.zyjs_mingcheng = "";
          this.personForm.zyjs_dm = "";
        } else {
          this.personForm.zyjs_mingcheng = row.detailFullName;
          this.personForm.zyjs_dm = row.detailCode;
        }
        this.$refs.zyjsPopover.showPopper = false;
        this.cadreInfoAlterUpdate("zyjs");
      } else if (dict == "GB2261D") {
        if (row.detailCode == "") {
          this.personForm.jiankang = "";
          this.personForm.jiankang_dm = "";
        } else {
          this.personForm.jiankang = row.detailFullName;
          this.personForm.jiankang_dm = row.detailCode;
        }
        this.$refs.jiankangPopover.showPopper = false;
        this.cadreInfoAlterUpdate("jiankang");
      } else if (dict == "DB206") {
        if (row.detailCode == "") {
          this.salaryForm.jzzjcc_mc = "";
          this.salaryForm.jzzjcc_bianma = "";
        } else {
          this.salaryForm.jzzjcc_mc = row.detailFullName;
          this.salaryForm.jzzjcc_bianma = row.detailCode;
        }
        this.$refs.zhijiPopover.showPopper = false;
        //缺少方法
      } else if (dict == "DB261") {
        if (row.detailCode == "") {
          this.salaryForm.jzzwcc_mc = "";
          this.salaryForm.jzzwcc_bianma = "";
        } else {
          this.salaryForm.jzzwcc_mc = row.detailFullName;
          this.salaryForm.jzzwcc_bianma = row.detailCode;
        }
        this.$refs.junzhuanzhiwuPopover.showPopper = false;
        //缺少方法
      }
    },
    popoverClick(dict) {
      if (dict == "GB2261") {
        this.$refs.xingbieSlot.init(dict);
      } else if (dict == "XZ93") {
        this.$refs.zhiweiSlot.init(dict);
      } else if (
        dict == "jiguan" ||
        dict == "chushengdi" ||
        dict == "chengzhangdi" ||
        dict == "jintie"
      ) {
        this.DB100Value = dict;
        dict = "DB100";
        if (this.DB100Value == "jiguan") {
          this.$refs.jiguanSlot.init(dict);
        } else if (this.DB100Value == "chushengdi") {
          this.$refs.chushengdiSlot.init(dict);
        } else if (this.DB100Value == "jintie") {
          this.$refs.jintieSlot.init(dict);
        } else {
          this.$refs.chengzhangdiSlot.init(dict);
        }
      } else if (dict == "GB3304") {
        this.$refs.minzuSlot.init(dict);
      } else if (dict == "ZB125") {
        this.$refs.rylbSlot.init(dict);
      } else if (dict == "ZB135") {
        this.$refs.bzlxSlot.init(dict);
      } else if (dict == "DB201") {
        this.$refs.gllbSlot.init(dict);
      } else if (dict == "XZ91") {
        this.$refs.baoliudaiyuSlot.init(dict);
      } else if (dict == "ZB134") {
        this.$refs.gzjbSlot.init(dict);
      } else if (dict == "ZB139") {
        this.$refs.zyjsSlot.init(dict);
      } else if (dict == "GB2261D") {
        this.$refs.jiankangSlot.init(dict);
      } else if (dict == "DB225") {
        this.$refs.sxlyRef.init(dict, this.personForm.sxly);
        this.$refs.sxlyRef.dialogVisible = true;
      } else if (dict == "DB206") {
        this.$refs.zhijiSlot.init(dict);
      } else if (dict == "DB261") {
        this.$refs.junzhuanzhiwuSlot.init(dict);
      }
    },
    onArchives() {},
    getCheckResult(personId) {
      const codeJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          personId: personId,
        },
      };
      getPersonDetail(codeJsons)
        .then((response) => {
          if (response.result) {
            this.tableData = response.resultdata;
          } else {
            this.$message.error(response.message);
          }
        })
        .catch(() => {});
    },
    async initData(person_id, personEdit, title, isDeleted) {
      this.visible = true;
      this.loading = true;
      this.personEdit = personEdit;
      this.person_id = person_id;
      this.title = title;
      if (isDeleted) {
        this.isDeleted = isDeleted;
      } else {
        this.isDeleted = "";
      }
      showLoading();
      if (this.zzmmOptions.length === 0) {
        const codeJsons = {
          userId: store.getters.user_id.toString(),
          token: store.getters.token.toString(),
          system: "datacenter",
          data: {
            params: ["GB4762"],
          },
        };
        await getDictionary(codeJsons)
          .then((response) => {
            if (response.result) {
              this.zzmmOptions = response.resultdata.GB4762;
              hideLoading();
            } else {
              hideLoading();
              this.onClosed();
              this.$message.error(response.message);
            }
          })
          .catch(() => {
            hideLoading();
            this.visible = false;
          });
      }
      if (person_id != null && person_id !== "") {
        const personJsons = {
          userId: store.getters.user_id.toString(),
          token: store.getters.token.toString(),
          system: "datacenter",
          data: {
            person_id: person_id,
            personEdit: personEdit,
          },
        };
        await getPerson(personJsons)
          .then((response) => {
            if (response.result) {
              if (response.resultdata.glnx == "-1") {
                response.resultdata.glnx = "";
              }
              if (response.resultdata.glnx_kc == "-1") {
                response.resultdata.glnx_kc = "";
              }
              this.personForm = response.resultdata;
              this.personForm.rudangxinxiForLook = this.personForm.zzmm
                ? this.personForm.zzmm +
                  (this.personForm.dedp
                    ? "," +
                      this.personForm.dedp +
                      (this.personForm.dsdp ? "," + this.personForm.dsdp : "")
                    : "")
                : "";
              this.personForm.rdsjForLook = this.personForm.rdsj
                ? this.personForm.rdsj.replace("-", ".").substring(0, 7) +
                  (this.personForm.dedp_rdsj
                    ? "," +
                      this.personForm.dedp_rdsj
                        .replace("-", ".")
                        .substring(0, 7) +
                      (this.personForm.dsdp_rdsj
                        ? "," +
                          this.personForm.dsdp_rdsj
                            .replace("-", ".")
                            .substring(0, 7)
                        : "")
                    : "")
                : "";
              if (personEdit == "0") {
                let personIsEdit = {
                  personJob: "0",
                  personEducation: "0",
                  personPost: "0",
                  personYEPost: "0",
                  personRank: "0",
                  personResume: "0",
                  personAssessment: "0",
                  personPunishment: "0",
                  personReward: "0",
                  personFamily: "0",
                  personProfession: "0",
                  personAttach: "0",
                  personTrain: "0",
                };
                this.personWage = "0";
                sessionStorage.setItem(
                  "personIsEdit",
                  JSON.stringify(personIsEdit)
                );
              } else {
                let personIsEdit = {
                  personJob: this.personForm.personJob,
                  personEducation: this.personForm.personEducation,
                  personPost: this.personForm.personPost,
                  personYEPost: this.personForm.personYEPost,
                  personRank: this.personForm.personRank,
                  personResume: this.personForm.personResume,
                  personAssessment: this.personForm.personAssessment,
                  personPunishment: this.personForm.personPunishment,
                  personReward: this.personForm.personReward,
                  personFamily: this.personForm.personFamily,
                  personProfession: this.personForm.personProfession,
                  personAttach: this.personForm.personAttach,
                  personTrain: this.personForm.personTrain,
                };
                this.personWage = this.personForm.personWage;
                sessionStorage.setItem(
                  "personIsEdit",
                  JSON.stringify(personIsEdit)
                );
              }
            } else {
              hideLoading();
              this.onClosed();
              this.$message.error(response.message);
            }
          })
          .catch(() => {
            hideLoading();
            this.visible = false;
          });
        const familyJsons = {
          userId: store.getters.user_id.toString(),
          token: store.getters.token.toString(),
          system: "datacenter",
          data: {
            person_id: this.personForm.person_id,
          },
        };
        await getFamilyList(familyJsons)
          .then((response) => {
            if (response.result) {
              hideLoading();
              this.$refs.dialogFamily.personId = this.personForm.person_id;
              this.$refs.dialogFamily.tableData = response.resultdata;
            } else {
              hideLoading();
              this.onClosed();
              this.$message.error(response.message);
            }
          })
          .catch(() => {
            hideLoading();
          });
        this.getCheckResult(person_id);
        this.getWageInfo(person_id);
      } else {
        const personJsons = {
          userId: store.getters.user_id.toString(),
          token: store.getters.token.toString(),
          system: "datacenter",
        };
        await addBlankPerson(personJsons)
          .then((response) => {
            if (response.result) {
              hideLoading();
              this.personForm.person_id = response.resultdata.id;
              this.$refs.dialogFamily.tableData = [];
              this.$refs.dialogFamily.personId = response.resultdata.id;
              let personIsEdit = {
                personJob: "1",
                personEducation: "1",
                personPost: "1",
                personYEPost: "1",
                personRank: "1",
                personResume: "1",
                personAssessment: "1",
                personPunishment: "1",
                personReward: "1",
                personFamily: "1",
                personProfession: "1",
                personAttach: "1",
                personTrain: "1",
              };
              this.personWage = this.personForm.personWage;
              sessionStorage.setItem(
                "personIsEdit",
                JSON.stringify(personIsEdit)
              );
            } else {
              hideLoading();
              this.onClosed();
              this.$message.error(response.message);
            }
          })
          .catch(() => {
            hideLoading();
          });
      }
      hideLoading();
      this.loading = false;
    },
    getPersonWage() {
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          ry_id: this.personForm.person_id,
        },
      };
      getWage(personJsons).then((response) => {
        if (response.result) {
          this.personWageForm = response.resultdata;
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    getTrainRmb() {
      this.$refs.dialogTrain.init(this.personForm.person_id);
    },
    getArchives() {
      this.$refs.dialogArchives.initData(this.personForm.person_id);
    },
    getAttach() {
      this.$refs.dialogAttach.init(this.personForm.person_id);
    },
    onProfession(row) {
      if (row !== "" && row != null) {
        this.personForm.zyjszw = row.zhyjs_mingcheng;
      } else {
        this.personForm.zyjszw = "";
      }
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          zyjszw: this.personForm.zyjszw,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    getPersonMessage(sfzh) {
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          sfzh: sfzh,
        },
      };
      getPerson(personJsons)
        .then((response) => {
          if (response.result) {
            this.personForm = response.resultdata;
          } else {
            hideLoading();
            this.onClosed();
            this.$message.error(response.message);
          }
        })
        .catch(() => {
          hideLoading();
          this.visible = false;
        });
    },
    // 分管工作
    getFg() {
      if (this.personForm.person_id) {
        let that = this;
        that.$nextTick(() => {
          that.$refs.dialogInChargeJobs.init(this.personForm.person_id);
        });
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    checkIdCard() {
      const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
      if (
        this.personForm.sfzh === "" ||
        this.personForm.sfzh === undefined ||
        this.personForm.sfzh == null
      ) {
        this.$message.error("身份证号码不能为空");
      } else {
        if (!reg.test(this.personForm.sfzh) && this.personForm.sfzh !== "") {
          this.$message.error("请输入正确的二代身份证号码");
        } else {
          this.personForm.sfzh = this.personForm.sfzh.replace("x", "X");
        }
      }
    },
    getParent(id, modules) {
      const parentMenu = [];
      modules.forEach((item) => {
        if (item.parentId === id) {
          const node = {
            label: item.detailName,
            value: item.detailCode,
            code: item.detailCode,
            children: [],
            parentId: item.parentId,
          };
          parentMenu.push(node);
          this.getChildMenu(node, modules);
        }
      });
      return parentMenu;
    },
    getChildMenu(node, modules) {
      const itemMenu = this.getParent(node.code, modules);
      node.children = itemMenu;
      if (itemMenu.length > 0) {
        itemMenu.forEach((node) => {
          this.getChildMenu(node, modules);
        });
      } else {
        node.children = null;
      }
    },
    getEducation() {
      if (this.personForm.person_id) {
        this.$refs.dialogEducation.initData(
          this.personForm.person_id,
          this.personForm.xl_zg,
          this.personForm.xlxx_zg,
          this.personForm.xw_zg,
          this.personForm.xwxx_zg
        );
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    async onEducationed(params) {
      if (params != "") {
        this.personForm.qrzxl_zg = params.qrzxl_zg;
        this.personForm.qrzxlxx_zg = params.qrzxlxx_zg;
        this.personForm.qrzxw_zg = params.qrzxw_zg;
        this.personForm.qrzxwxx_zg = params.qrzxwxx_zg;
        this.personForm.zzxl_zg = params.zzxl_zg;
        this.personForm.zzxlxx_zg = params.zzxlxx_zg;
        this.personForm.zzxw_zg = params.zzxw_zg;
        this.personForm.zzxwxx_zg = params.zzxwxx_zg;
        this.personForm.xl_zg = params.xl_zg;
        this.personForm.xlxx_zg = params.xlxx_zg;
        this.personForm.xw_zg = params.xw_zg;
        this.personForm.xwxx_zg = params.xwxx_zg;
      }
    },
    getZzmm() {
      this.$refs.dialogZzmm.getMessage();
      if (this.personForm.rudangxinxi_edit == "1") {
        this.$refs.dialogZzmm.init(this.personForm);
      } else {
        this.$refs.dialogZzmm.init(this.personForm);
      }
    },
    getPost() {
      if (this.personForm.person_id) {
        this.$refs.dialogPost.init(this.personForm.person_id);
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getYEPost() {
      if (this.personForm.person_id) {
        this.$refs.dialogYEPost.init(this.personForm.person_id);
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    async onZzmm(resData) {
      this.zzmmForback = resData.rdsj;
      this.zzmm_dmForback = resData.zzmm_dm == "" ? "" : resData.zzmm_dm.value;
      this.dedp_dm = resData.dedp_dm == "" ? "" : resData.dedp_dm.value;
      this.dsdp_dm = resData.dsdp_dm == "" ? "" : resData.dsdp_dm.value;
      this.personForm.dedp_rdsj = resData.dedp_rdsj;
      this.personForm.dsdp_rdsj = resData.dsdp_rdsj;
      this.personForm.zzmm = resData.zzmm_dm == "" ? "" : resData.zzmm_dm.label;
      this.personForm.dedp = resData.dedp_dm == "" ? "" : resData.dedp_dm.label;
      this.personForm.dsdp = resData.dsdp_dm == "" ? "" : resData.dsdp_dm.label;
      let rdxx = "";
      let rdxxlrmx = "";
      let rdxxck = "";
      let rdsjck = "";
      if (resData.zzmm_dm.value) {
        rdxxck = resData.zzmm_dm.label;
        if (resData.dedp_dm.value) {
          rdxxck = rdxxck + "," + resData.dedp_dm.label;
          if (resData.dsdp_dm.value) {
            rdxxck = rdxxck + "," + resData.dsdp_dm.label;
          }
        }
      }
      if (resData.rdsj) {
        rdsjck = resData.rdsj.replace("-", ".").substring(0, 7);
        if (resData.dedp_rdsj) {
          rdsjck =
            rdsjck + "," + resData.dedp_rdsj.replace("-", ".").substring(0, 7);
          if (resData.dsdp_rdsj) {
            rdsjck =
              rdsjck +
              "," +
              resData.dsdp_rdsj.replace("-", ".").substring(0, 7);
          }
        }
      }
      if (resData.zzmm_dm.value == "01" || resData.zzmm_dm.value == "02") {
        this.personForm.rdsj = resData.rdsj;
        rdxx =
          (resData.dedp_dm.value != "" && resData.dedp_dm.value != null
            ? resData.dedp_dm.label + "、"
            : "") +
          (resData.dsdp_dm.value != "" && resData.dsdp_dm.value != null
            ? resData.dsdp_dm.label + "、"
            : "");
        this.personForm.rudangxinxi =
          rdxx.charAt(rdxx.length - 1) == "、"
            ? rdxx.substring(0, rdxx.length - 1) +
              " (" +
              resData.rdsj.replace("-", ".").substring(0, 7) +
              ")"
            : resData.rdsj.replace("-", ".").substring(0, 7);
        rdxxlrmx =
          resData.rdsj.replace("-", "").substring(0, 6) +
          "；" +
          (resData.dedp_dm.value != "" && resData.dedp_dm.value != null
            ? resData.dedp_dm.label + "；"
            : "") +
          (resData.dsdp_dm.value != "" && resData.dsdp_dm.value != null
            ? resData.dsdp_dm.label + "；"
            : "");
      } else if (
        resData.dedp_dm.value == "01" ||
        resData.dedp_dm.value == "02"
      ) {
        this.personForm.rdsj = resData.dedp_rdsj;
        rdxx =
          (resData.zzmm_dm.value != "" && resData.zzmm_dm.value != null
            ? resData.zzmm_dm.label + "、"
            : "") +
          (resData.dsdp_dm.value != "" && resData.dsdp_dm.value != null
            ? resData.dsdp_dm.label + "、"
            : "");
        this.personForm.rudangxinxi =
          rdxx.charAt(rdxx.length - 1) == "、"
            ? rdxx.substring(0, rdxx.length - 1) +
              " (" +
              resData.dedp_rdsj.replace("-", ".").substring(0, 7) +
              ")"
            : resData.dedp_rdsj.replace("-", ".").substring(0, 7);
      } else if (
        resData.dsdp_dm.value == "01" ||
        resData.dsdp_dm.value == "02"
      ) {
        this.personForm.rdsj = resData.dsdp_rdsj;
        rdxx =
          (resData.zzmm_dm.value != "" && resData.zzmm_dm.value != null
            ? resData.zzmm_dm.label + "、"
            : "") +
          (resData.dedp_dm.value != "" && resData.dedp_dm.value != null
            ? resData.dedp_dm.label + "、"
            : "");
        this.personForm.rudangxinxi =
          rdxx.charAt(rdxx.length - 1) == "、"
            ? rdxx.substring(0, rdxx.length - 1) +
              " (" +
              resData.dsdp_rdsj.replace("-", ".").substring(0, 7) +
              ")"
            : resData.dsdp_rdsj.replace("-", ".").substring(0, 7);
      } else if (resData.zzmm_dm.value !== "13") {
        this.personForm.rdsj = resData.rdsj;
      } else {
        this.personForm.rdsj = "";
        this.personForm.rudangxinxi =
          (resData.zzmm_dm.value != "" && resData.zzmm_dm.value != null
            ? resData.zzmm_dm.label + "、"
            : "") +
          (resData.dedp_dm.value != "" && resData.dedp_dm.value != null
            ? resData.dedp_dm.label + "、"
            : "") +
          (resData.dsdp_dm.value != "" && resData.dsdp_dm.value != null
            ? resData.dsdp_dm.label + "、"
            : "");
        rdxxlrmx =
          (resData.zzmm_dm.value != "" && resData.zzmm_dm.value != null
            ? resData.zzmm_dm.label + "；"
            : "") +
          (resData.dedp_dm.value != "" && resData.dedp_dm.value != null
            ? resData.dedp_dm.label + "；"
            : "") +
          (resData.dsdp_dm.value != "" && resData.dsdp_dm.value != null
            ? resData.dsdp_dm.label + "；"
            : "");
      }
      if (
        this.personForm.rudangxinxi.charAt(
          this.personForm.rudangxinxi.length - 1
        ) == "、"
      ) {
        this.personForm.rudangxinxi = this.personForm.rudangxinxi.substring(
          0,
          this.personForm.rudangxinxi.length - 1
        );
      }
      if (rdxxlrmx.charAt(this.personForm.rudangxinxi.length - 1) == "；") {
        rdxxlrmx = rdxxlrmx.substring(0, rdxxlrmx.length - 1);
      }
      this.personForm.rudangxinxiForLook = rdxxck;
      this.personForm.rdsjForLook = rdsjck;
      let that = this;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          zzmm_dm: resData.zzmm_dm == "" ? "" : resData.zzmm_dm.value,
          dedp_dm: resData.dedp_dm == "" ? "" : resData.dedp_dm.value,
          dsdp_dm: resData.dsdp_dm == "" ? "" : resData.dsdp_dm.value,
          rdsj: this.personForm.rdsj == "" ? null : this.personForm.rdsj,
          dedp_rdsj: resData.dedp_rdsj,
          dsdp_rdsj: resData.dsdp_rdsj,
          rudangxinxi: this.personForm.rudangxinxi,
          rudangxinxilrmx: rdxxlrmx,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          if (that.title == "人员修改") {
            that.$message.success(response.message);
            that.personForm.rudangxinxiForLook = rdxxck;
            that.personForm.rdsjForLook = rdsjck;
            that.personForm.zzmm_dm = that.zzmm_dmForback;
            that.personForm.dedp_dm = that.dedp_dm;
            that.personForm.dsdp_dm = that.dsdp_dm;
          } else {
            that.personForm.zzmm_dm = that.zzmm_dmForback;
            that.personForm.dedp_dm = that.dedp_dm;
            that.personForm.dsdp_dm = that.dsdp_dm;
            that.zzmmOptions.forEach((item) => {
              if (item.detailCode == that.zzmm_dmForback) {
                that.personForm.zzmm = item.detailName;
              }
              if (item.detailCode == that.dedp_dm) {
                that.personForm.dedp = item.detailName;
              }
              if (item.detailCode == that.dsdp_dm) {
                that.personForm.dsdp = item.detailName;
              }
            });
            that.personForm.rdsj = that.zzmmForback;
            that.personForm.rudangxinxiForLook = rdxxck;
            that.personForm.rdsjForLook = rdsjck;
          }
        } else {
          that.$message.error(response.message);
        }
      });
    },
    async onPosted(row) {
      if (
        row != null &&
        row.zhiwu_zhuangtai !== 0 &&
        row.zhiwu_zhuangtai !== "0"
      ) {
        this.personForm.zwcc = row.zhiwu_cengci;
        this.personForm.zwcc_dm = row.zhiwu_cengci_dm;
        this.personForm.zwcc_sj = row.zhiwu_pizhunriqi;
      } else {
        this.personForm.zwcc = "";
        this.personForm.zwcc_dm = "";
        this.personForm.zwcc_sj = null;
      }
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          zwcc_dm: this.personForm.zwcc_dm,
          zwcc_sj: this.personForm.zwcc_sj,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    getRank() {
      if (this.personForm.person_id) {
        this.$refs.dialogRank.init(this.personForm.person_id);
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    async onYEPosted(row) {
      if (
        row != null &&
        row.zhiwu_zhuangtai !== 0 &&
        row.zhiwu_zhuangtai !== "0"
      ) {
        this.personForm.yezwcc_mc = row.ye_zwcc_mc;
        this.personForm.yezwcc_bianma = row.ye_zwcc_dm;
        this.personForm.yezwcc_sj = row.ye_zwcc_pzrq;
      } else {
        this.personForm.yezwcc_mc = "";
        this.personForm.yezwcc_bianma = "";
        this.personForm.yezwcc_sj = null;
      }
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          yezwcc_mc: this.personForm.yezwcc_mc,
          yezwcc_bianma: this.personForm.yezwcc_bianma,
          yezwcc_sj: this.personForm.yezwcc_sj,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    getRank() {
      if (this.personForm.person_id) {
        this.$refs.dialogRank.init(this.personForm.person_id);
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    async onRanked(row) {
      if (row === "" || row == null) {
        this.personForm.zjcc_mc = "";
        this.personForm.zjcc_dm = "";
        this.personForm.zjcc_sj = null;
        this.personForm.lxzwcj_sj = null;
      } else {
        this.personForm.zjcc_mc = row.zhiji_cengci;
        this.personForm.zjcc_dm = row.zhiji_cengci_dm;
        this.personForm.zjcc_sj = row.zhiji_pizhunriqi;
        this.personForm.lxzwcj_sj = row.zhiji_qisuanshijian;
      }
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          zjcc_dm: this.personForm.zjcc_dm,
          zjcc_sj: this.personForm.zjcc_sj,
          lxzwcj_sj: this.personForm.lxzwcj_sj,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    chooseParentModule(gxjg) {
      this.gxjg = gxjg;
      if (gxjg == "xz") {
        this.$refs.dialogTree.init(gxjg);
      } else if (gxjg == "tj") {
        this.$refs.dialogTree.init(gxjg);
      } else if (gxjg == "gz") {
        this.$refs.dialogTree.init(gxjg);
      }
    },
    async onModuleChoosed(module) {
      if (this.gxjg === "tj") {
        this.personForm.tongji_jg_id = module.id;
        this.personForm.tongji_jg_mingcheng = module.label;
        this.gxjg = "";
        this.cadreInfoAlterUpdate("tongji_jg");
      } else if (this.gxjg === "xz") {
        this.personForm.xingzheng_jg_id = module.id;
        this.personForm.xingzheng_jg_mingcheng = module.label;
        this.gxjg = "";
        this.cadreInfoAlterUpdate("xingzheng_jg");
      } else if (this.gxjg === "gz") {
        this.personForm.gongzi_jg_id = module.id;
        this.personForm.gongzi_jg_bianma = module.id;
        this.personForm.gongzi_jg_mingcheng = module.label;
        this.gxjg = "";
        this.cadreInfoAlterUpdate("gongzi_jg");
      }
    },
    getAssessment() {
      if (this.personForm.person_id) {
        this.$refs.dialogAssessment.init(
          this.personForm.person_id,
          this.personForm.kaohenianshu,
          this.personForm.kaohe
        );
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getJob() {
      if (this.personForm.person_id) {
        this.$refs.dialogJob.init(this.personForm, "normal");
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getProfession() {
      if (this.personForm.person_id) {
        this.$refs.dialogProfession.init(this.personForm.person_id);
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getResume() {
      if (this.personForm.person_id) {
        this.$refs.dialogResumeDetail.init(
          this.personForm.jianli,
          this.personForm.person_id,
          this.personForm.jianli_jingjian,
          this.personForm.sfzh
        );
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getPunishment() {
      if (this.personForm.person_id) {
        this.$refs.dialogPunishment.init(
          this.personForm.person_id,
          this.personForm.cf
        );
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    getDbwyqk() {
      if (this.personForm.person_id) {
        this.$refs.dialogDeputy.init(
          this.personForm.person_id,
          this.personForm.jl,
          "",
          this.personForm.ry_dbsf_zs,
          this.personForm.ry_hyzw_zs
        );
      }
    },
    getReward() {
      if (this.personForm.person_id) {
        this.$refs.dialogReward.init(
          this.personForm.person_id,
          this.personForm.jl
        );
      } else {
        this.$message.error("请先完成人员基本信息维护！");
      }
    },
    async onAssessmented(param) {
      this.personForm.kaohe = param.kaohe;
      this.personForm.kaohenianshu = param.kaohenianshu;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          kaohe: this.personForm.kaohe,
          kaohenianshu: this.personForm.kaohenianshu,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async onResumeDetail(jlzs, jljj) {
      this.personForm.jianli = jlzs;
      this.personForm.jianli_jingjian = jljj;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          jianli: this.personForm.jianli,
          jianli_jingjian: this.personForm.jianli_jingjian,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async onTrainDetail(pxzs) {
      this.personForm.peixun = pxzs;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          peixun: this.personForm.peixun,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async onReward(jczs) {
      this.personForm.jl = jczs;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          jl: this.personForm.jl,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async onPunishment(jczs) {
      this.personForm.cf = jczs;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          cf: this.personForm.cf,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    async onJob(quancheng, jiancheng, zw_sj) {
      this.personForm.zhiwu_quancheng = quancheng;
      this.personForm.zhiwu_jiancheng = jiancheng;
      this.personForm.zw_sj = zw_sj;
      const personJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: this.personForm.person_id,
          zhiwu_quancheng: this.personForm.zhiwu_quancheng,
          zhiwu_jiancheng: this.personForm.zhiwu_jiancheng,
          zw_sj: this.personForm.zw_sj,
        },
      };
      updatePerson(personJsons).then((response) => {
        if (response.result) {
          this.$message.success(response.message);
        } else {
          this.$message.error(response.message);
        }
      });
    },
    closedRmb() {
      this.activeName = "first";
      this.activeName1 = "rightTab";
      this.activeName2 = "first";
      this.tableData = [];
      if (this.isDeleted == "导入") {
        this.$confirm(
          "确定关闭吗，关闭页面后，当前修改的数据将不做保存",
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }
        )
          .then(() => {
            this.visible = false;
            this.onClosed();
          })
          .catch(() => {});
      } else {
        this.visible = false;
      }
    },
    // 表单提交
    async onSubmit() {
      this.$refs.personBaseForm.validate((valid) => {
        showLoading();
        //将级联下拉菜单数据进行特殊处理
        let that = this;
        if (!that.personForm.xingming) {
          hideLoading();
          this.$message.error("请输入姓名！");
          return;
        }
        if (!that.personForm.zzmm_dm) {
          hideLoading();
          this.$message.error("请输入政治面貌！");
          return;
        }
        if (!that.personForm.zhiwu_jiancheng) {
          hideLoading();
          that.$message.error("现工作单位及职务不可为空！");
          return;
        }
        let sfzh = that.personForm.sfzh;
        let sjh = /^[1][3-9][0-9]{9}$/;
        let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
        if (!(sfzh && reg.test(sfzh))) {
          hideLoading();
          this.$message.error("请输入正确的身份证号！");
          return;
        }
        if (
          this.personForm.shouji !== "" &&
          this.personForm.shouji !== undefined &&
          this.personForm.shouji !== null
        ) {
          if (
            !sjh.test(this.personForm.shouji) &&
            this.personForm.shouji !== ""
          ) {
            hideLoading();
            this.$message.error("请输入正确的电话号码");
            return;
          }
        }
        if (!that.personForm.zhiweileibie_dm) {
          hideLoading();
          this.$message.error("请选择职位类别！");
          return;
        }
        if (!that.personForm.rylb_dm) {
          hideLoading();
          this.$message.error("请选择人员类别！");
          return;
        }
        if (!that.personForm.bzlx) {
          hideLoading();
          this.$message.error("请选编制类型！");
          return;
        }
        if (!that.personForm.gllb) {
          hideLoading();
          this.$message.error("请选择管理类别！");
          return;
        }
        if (!that.personForm.xingzheng_jg_mingcheng) {
          hideLoading();
          this.$message.error("请选择编制关系所在单位！");
          return;
        }
        if (!that.personForm.tongji_jg_mingcheng) {
          hideLoading();
          this.$message.error("请选择统计关系所在单位！");
          return;
        }
        if (!that.personForm.gongzi_jg_mingcheng) {
          hideLoading();
          this.$message.error("请选择工资关系所在单位！");
          return;
        }
        if (
          that.personForm.jiankang !== "健康" &&
          that.personForm.jiankang_xx === null &&
          that.personForm.jiankang_xx === ""
        ) {
          hideLoading();
          this.$message.error("请填写不健康原因！");
          return;
        }
        if (that.personForm.shifouxuandiao === "") {
          hideLoading();
          this.$message.error("请选择是否选调！");
          return;
        } else if (
          that.personForm.shifouxuandiao == "1" &&
          (that.personForm.xuandiaoriqi == null ||
            that.personForm.xuandiaoriqi == "")
        ) {
          hideLoading();
          this.$message.error("请录入选调时间！");
          return;
        }
        if (that.personForm.sfkl === "") {
          hideLoading();
          this.$message.error("请选择是否考录！");
          return;
        } else if (
          that.personForm.sfkl == "1" &&
          (that.personForm.klsj == null || that.personForm.klsj == "")
        ) {
          hideLoading();
          this.$message.error("请录入考录时间！");
          return;
        }
        that.personForm.is_deleted = 0;
        if (valid) {
          let submitData = that.personForm;
          const dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person: submitData,
            },
          };
          if (that.type === "add") {
            addGatherData(dataJsons)
              .then((response) => {
                if (response.result) {
                  hideLoading();
                  that.$message.success(response.message);
                  that.initData(sfzh, "人员修改");
                } else {
                  hideLoading();
                  that.$message.error(response.message);
                }
              })
              .catch(() => {
                hideLoading();
              });
          } else {
            updateGatherData(dataJsons)
              .then((response) => {
                if (response.result) {
                  hideLoading();
                  that.$message.success(response.message);
                  that.initData(sfzh, "人员修改");
                } else {
                  hideLoading();
                  that.$message.error(response.message);
                }
              })
              .catch(() => {
                hideLoading();
              });
          }
        } else {
          hideLoading();
          that.$message.error("信息尚未填写完整，请核对后提交");
          return false;
        }
      });
    },
    updateJobIsOutputCheck(personId, job_ids) {
      const dataJsons = {
        userId: store.getters.user_id.toString(),
        token: store.getters.token.toString(),
        system: "datacenter",
        data: {
          person_id: personId,
          job_id: job_ids,
        },
      };
      updateJobOutputCheck(dataJsons).then((response) => {
        if (!response.result) {
          this.$message.error(response.message);
        }
      });
    },
    getDictionaryTree(field) {
      this.field = field;
      if (field === "zhuanye") {
        this.$refs.dialogdictionaryTree.init("GB8561");
      } else if (field == "zhiwei") {
        this.$refs.dialogdictionaryTree.init("XZ93");
      } else if (field == "DB206") {
        this.$refs.dialogdictionaryTree.init("DB206");
      } else {
        this.$refs.dialogdictionaryTreeForzq.init("DB100");
      }
    },
    //点击显示 工龄增减弹框
    workYearShow() {
      this.$refs.lengthServiceRef.personId = this.personForm.person_id;
      this.$refs.lengthServiceRef.init();
    },
    setSxly(xsly) {
      this.personForm.sxly = xsly;
      this.cadreInfoAlterUpdate("sxly");
    },
    onGetback(module) {
      if (module === "clear") {
        if (this.field === "jiguan") {
          this.personForm.jiguan = "";
          this.personForm.jiguan_dm = "";
        } else if (this.field === "chushengdi") {
          this.personForm.chushengdi = "";
          this.personForm.chushengdi_dm = "";
        } else if (this.field === "chengzhangdi") {
          this.personForm.chengzhangdi = "";
          this.personForm.chengzhangdi_dm = "";
        } else if (this.field === "zhuanye") {
          this.personForm.zyjszw = "";
        } else if (this.field === "zhiwei") {
          this.personForm.zhiweileibie_mingcheng = "";
          this.personForm.zhiweileibie_dm = "";
        } else if (this.field === "DB206") {
          this.salaryForm.jzzjcc_bianma = "";
          this.salaryForm.jzzjcc_mc = "";
        }
      } else {
        if (this.field === "jiguan") {
          this.personForm.jiguan = module.detailFullName;
          this.personForm.jiguan_dm = module.code;
        } else if (this.field === "chushengdi") {
          this.personForm.chushengdi = module.detailFullName;
          this.personForm.chushengdi_dm = module.code;
        } else if (this.field === "chengzhangdi") {
          this.personForm.chengzhangdi = module.detailFullName;
          this.personForm.chengzhangdi_dm = module.code;
        } else if (this.field === "zhuanye") {
          this.personForm.zyjszw = module.detailName;
        } else if (this.field === "zhiwei") {
          this.personForm.zhiweileibie_mingcheng = module.detailName;
          this.personForm.zhiweileibie_dm = module.code;
        } else if (this.field === "DB206") {
          this.salaryForm.jzzjcc_bianma = module.code;
          this.salaryForm.jzzjcc_mc = module.detailName;
        }
      }
      this.field = "";
    },
    onClosed() {
      this.visible = false;
      this.activeName = "first";
      this.activeName1 = "rightTab";
      this.activeName2 = "first";
      this.personForm = {
        zhaopian: "",
        person_id: "",
        rudangxinxi: "",
        rudangxinxiForLook: "",
        xingming: "",
        xingbie: "",
        xingbie_dm: "",
        csny: "",
        minzu_dm: "",
        minzu_mc: "",
        jiguan: "",
        jiguan_dm: "",
        chushengdi: "",
        chushengdi_dm: "",
        chengzhangdi: "",
        chengzhangdi_dm: "",
        zhiweileibie_mingcheng: "",
        rdsj: "",
        rdsjForLook: "",
        cjgzsj: "",
        klsj: "",
        jiankang: "",
        sfzh: "",
        gwydjsj: "",
        xuandiaoriqi: "",
        zhiwu_quancheng: "",
        zhiwu_jiancheng: "",
        tongji_jg_id: "",
        tongji_jg_mingcheng: "",
        xingzheng_jg_id: "",
        xingzheng_jg_mingcheng: "",
        gongzi_jg_id: "",
        gongzi_jg_mingcheng: "",
        jiankang_xx: "",
        zzmm: "",
        zzmm_dm: "",
        dedp_dm: "",
        dedp: "",
        dsdp_dm: "",
        dsdp: "",
        dedp_rdsj: "",
        dsdp_rdsj: "",
        shouji: "",
        zyjszw: "",
        zhuanyejishu: "",
        qrzxl_zg: "",
        qrzxlxx_zg: "",
        qrzxw_zg: "",
        qrzxwxx_zg: "",
        zzxl_zg: "",
        zzxlxx_zg: "",
        zzxw_zg: "",
        zzxwxx_zg: "",
        zwcc_dm: "",
        zwcc: "",
        zwcc_sj: "",
        zjcc_dm: "",
        zjcc_mc: "",
        zjcc_sj: "",
        lxzwcj_sj: "",
        zwlb: "",
        zwlb_dm: "",
        gllb: "",
        gllb_dm: "",
        rylb: "",
        rylb_dm: "",
        baoliudaiyudaima: "",
        zhiweileibie_dm: "",
        lngzjl_bz: "",
        jinjinpingshikaohe: "",
        sfkl: "",
        shifouxuandiao: "",
        bzlx: "",
        bzlx_dm: "",
        jianli: "",
        jianli_jingjian: "",
        gzjb_dm: "",
        gzjb: "",
        zyjs_dm: "",
        zyjs_mingcheng: "",
        jl: "",
        cf: "",
        kaohe: "",
        zw_sj: "",
        baoliudaiyumingcheng: "",
        personBase: "1",
        personJob: "1",
        personEducation: "1",
        personPost: "1",
        personRank: "1",
        personResume: "1",
        personAssessment: "1",
        personPunishment: "1",
        personReward: "1",
        personFamily: "1",
        personProfession: "1",
        personYEPost: "1",
        yezwcc_banben: "",
        yezwcc_bianma: "",
        yezwcc_mc: "",
        yezwcc_sj: "",
        glnx: "",
        glnx_qssj: "",
        glnx_kcqssj: "",
        glnx_kcjzsj: "",
        glnx_kc: "",
        glnx_shuoming: "",
        qiaojuan: "",
      };
      (this.personWageForm = {
        gz_id: "",
        ry_id: "",
        ry_sfzh: "",
        gz_dy: "",
        gz_lqgzys: "",
        gz_jb: "",
        gz_dc: "",
        gz_sfbjdy: "",
        gz_zwgz: "",
        gz_zjgz: "",
        gz_gzx_bt: "",
        gz_shx_bt: "",
        gz_zfbt: "",
        gz_wybt: "",
        gz_gwjt_bt: "",
        gz_sxbjt_bt: "",
        gz_wfzg_bt: "",
        gz_qn_bt: "",
        gz_nnycx_jj: "",
        gz_lgsj_jj: "",
        gz_jswm_jj: "",
        gz_ndjxkh_jj: "",
        gz_yefgjcgkh_jj: "",
        gz_pskh_jj: "",
        yq_jbt: "",
        przgwy_jbt: "",
        qtjlx_jbt: "",
        xzgz_jbt: "",
        jcjx_jbt: "",
        jczq_jbt: "",
        jcjb_jbt: "",
        zfw_jbt: "",
        jwjcw_jbt: "",
        xf_jbt: "",
        sj_jbt: "",
        baomi_jbt: "",
        aqsc_jbt: "",
        sfzl_jbt: "",
        fjgg_jbt: "",
        jcyzl_jbt: "",
        gjtyqt_jbt: "",
        shf_jbt: "",
        wxj_jbt: "",
        qt_jbt: "",
        gz_bzxx: "",
      }),
        (this.salaryForm = {
          person_id: "", //人员主键
          gongzi_jg_id: "", //工资关系所在单位ID
          gongzi_jg_bianma: "", //工资关系所在单位CODE
          gongzi_jg_mingcheng: "", //工资关系所在单位NAME
          glzj: "", //工龄增加合计（月）
          gljs: "", //工龄减少合计（月）
          glsm: "", //工龄增减说明
          sfwf: "", //是否具备无房补贴发放条件
          jtdq_banben: "", //津补贴发放执行的地区标准
          jtdq_bianma: "", //津补贴发放执行的地区标准
          jtdq_mc: "", //津补贴发放执行的地区标准
          dszncsny: "", //独生子女出生日期（独生子女填写）
          sfftjgz: "", //是否副厅级单位执行高定级别工资（是否属于对应一级调研员政策范围人员）
          sykssj: "", //试用(见习、初期)开始时间
          syzzsj: "", //试用(见习、初期)终止时间
          zzdjsj: "", //转正(期满)定级时间
          jzzwcc_banben: "", //军转干部转业前军队职务层次--版本
          jzzwcc_bianma: "", //军转干部转业前军队职务层次--CODE
          jzzwcc_mc: "", //军转干部转业前军队职务层次--NAME
          jzzjcc_banben: "", //军转干部转业后享受的职级层次--版本
          jzzjcc_bianma: "", //军转干部转业后享受的职级层次--CODE
          jzzjcc_mc: "", //军转干部转业后享受的职级层次--NAME
          gzbeizhu: "", //备注
        });
      this.$emit("onClosed");
    },
    handleAvatarSuccess(res, file) {
      this.personForm.zhaopian = res.url;
      this.cadreInfoAlterUpdate("zhaopian");
    },
    beforeAvatarUpload(file) {
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return isLt2M;
    },
    // 取值
    getValue(value) {
      this.valueId = value;
    },
    // changeglzt(res) {
    //     console.log(res)
    // },
    querySearch(queryString, cb) {
      let restaurants = this.restaurants;
      let results = queryString
        ? restaurants.filter(this.createFilter(queryString))
        : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return (restaurant) => {
        return (
          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
          0
        );
      };
    },
    updateIdCard() {
      // if(this.personForm.sf_sfzh_sh != '1'){
      //   if(this.personForm.sfzh_edit=='1') {
      this.$refs.dialogIdCard.init(
        this.personForm.sfzh,
        this.personForm.person_id
      );
      //   }
      // }else{
      //   this.$message.warning('身份证号已核实，不可修改！');
      // }
    },
    onGetIdCard(idCard) {
      this.personForm.sfzh = idCard;
    },
    checkForm(value) {
      if (value == null || value === "" || value.trim() === "") {
        return false;
      } else {
        return true;
      }
    },
    cadreInfoAlterUpdate(type) {
      if (this.title == "人员修改") {
        let dataJsons = {};
        const that = this;
        if (type == "xingming") {
          if (!this.checkForm(this.personForm.xingming)) {
            this.$message.error("姓名不允许为空！");
            hideLoading();
            return;
          }
          if (this.personForm.xingming_edit == "1") {
            showLoading();
            dataJsons = {
              userId: store.getters.user_id.toString(),
              token: store.getters.token.toString(),
              system: "datacenter",
              data: {
                person_id: this.personForm.person_id,
                xingming: this.personForm.xingming,
              },
            };
            cadreInfoAlter(dataJsons)
              .then((response) => {
                hideLoading();
                if (response.result) {
                  that.$message.success(response.message);
                } else {
                  that.$message.error(response.message);
                }
              })
              .catch(() => {
                hideLoading();
              });
          }
        } else if (type == "shouji") {
          const reg = /^[1][3-9][0-9]{9}$/;
          if (
            this.checkForm(this.personForm.shouji) &&
            this.personForm.shouji !== undefined
          ) {
            if (!reg.test(this.personForm.shouji)) {
              this.$message.error("请输入正确的电话号码");
              hideLoading();
              return;
            } else {
              if (this.personForm.shouji_edit == "1") {
                showLoading();
                dataJsons = {
                  userId: store.getters.user_id.toString(),
                  token: store.getters.token.toString(),
                  system: "datacenter",
                  data: {
                    person_id: this.personForm.person_id,
                    shouji: this.personForm.shouji,
                  },
                };
                cadreInfoAlter(dataJsons)
                  .then((response) => {
                    hideLoading();
                    if (response.result) {
                      that.$message.success(response.message);
                    } else {
                      that.$message.error(response.message);
                    }
                  })
                  .catch(() => {
                    hideLoading();
                  });
              }
            }
          } else {
            hideLoading();
            return;
          }
        } else if (type == "zhaopian") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zhaopian: this.personForm.zhaopian,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "csny") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              csny: this.personForm.csny,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "cjgzsj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              cjgzsj: this.personForm.cjgzsj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "xingbie") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              xingbie: this.personForm.xingbie,
              xingbie_dm: this.personForm.xingbie_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zhiweileibie") {
          if (!this.checkForm(this.personForm.zhiweileibie_dm)) {
            this.$message.error("职位类别不允许为空！");
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zhiweileibie_mingcheng: this.personForm.zhiweileibie_mingcheng,
              zhiweileibie_dm: this.personForm.zhiweileibie_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "jiguan") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              jiguan: this.personForm.jiguan,
              jiguan_dm: this.personForm.jiguan_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "chushengdi") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              chushengdi: this.personForm.chushengdi,
              chushengdi_dm: this.personForm.chushengdi_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "chengzhangdi") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              chengzhangdi: this.personForm.chengzhangdi,
              chengzhangdi_dm: this.personForm.chengzhangdi_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "minzu") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              minzu_mc: this.personForm.minzu_mc,
              minzu_dm: this.personForm.minzu_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "rylb") {
          if (!this.checkForm(this.personForm.rylb_dm)) {
            this.$message.error("人员类别不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              rylb: this.personForm.rylb,
              rylb_dm: this.personForm.rylb_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "bzlx") {
          if (!this.checkForm(this.personForm.bzlx_dm)) {
            this.$message.error("编制类型不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              bzlx: this.personForm.bzlx,
              bzlx_dm: this.personForm.bzlx_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "gllb") {
          if (!this.checkForm(this.personForm.gllb_dm)) {
            this.$message.error("管理类别不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              gllb: this.personForm.gllb,
              gllb_dm: this.personForm.gllb_dm,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "baoliudaiyu") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              baoliudaiyumingcheng: this.personForm.baoliudaiyumingcheng,
              baoliudaiyudaima: this.personForm.baoliudaiyudaima,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "gwydjsj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              gwydjsj: this.personForm.gwydjsj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "jiankang") {
          if (this.personForm.jiankang == "健康") {
            showLoading();
            this.personForm.jiankang_xx = "";
            dataJsons = {
              userId: store.getters.user_id.toString(),
              token: store.getters.token.toString(),
              system: "datacenter",
              data: {
                person_id: this.personForm.person_id,
                jiankang: this.personForm.jiankang,
                jiankang_xx: this.personForm.jiankang_xx,
              },
            };
            cadreInfoAlter(dataJsons)
              .then((response) => {
                hideLoading();
                if (response.result) {
                  that.$message.success(response.message);
                } else {
                  that.$message.error(response.message);
                }
              })
              .catch(() => {
                hideLoading();
              });
          } else {
            if (
              this.personForm.jiankang_xx == null ||
              this.personForm.jiankang_xx == ""
            ) {
              that.$message.warning("请填写不健康原因！");
            } else {
              showLoading();
              dataJsons = {
                userId: store.getters.user_id.toString(),
                token: store.getters.token.toString(),
                system: "datacenter",
                data: {
                  person_id: this.personForm.person_id,
                  jiankang: this.personForm.jiankang,
                  jiankang_xx: this.personForm.jiankang_xx,
                },
              };
              cadreInfoAlter(dataJsons)
                .then((response) => {
                  hideLoading();
                  if (response.result) {
                    that.$message.success(response.message);
                  } else {
                    that.$message.error(response.message);
                  }
                })
                .catch(() => {
                  hideLoading();
                });
            }
          }
        } else if (type == "zhuanyejishu") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zhuanyejishu: this.personForm.zhuanyejishu,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "lngzjl_bz") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              lngzjl_bz: this.personForm.lngzjl_bz, // == true ? '1' : '0'
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "jinjinpingshikaohe") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              jinjinpingshikaohe: this.personForm.jinjinpingshikaohe, // == true ? '1' : '0'
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "sfkl") {
          showLoading();
          if (this.personForm.sfkl == "0") {
            this.personForm.klsj = null;
          }
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              sfkl: this.personForm.sfkl, // == true ? '1' : '0'
              klsj: this.personForm.klsj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "shifouxuandiao") {
          showLoading();
          if (this.personForm.shifouxuandiao == "0") {
            this.personForm.xuandiaoriqi = null;
          }
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              shifouxuandiao: this.personForm.shifouxuandiao, // == true ? '1' : '0'
              xuandiaoriqi: this.personForm.xuandiaoriqi,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "xuandiaoriqi") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              xuandiaoriqi: this.personForm.xuandiaoriqi,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "klsj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              klsj: this.personForm.klsj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "xingzheng_jg") {
          if (!this.checkForm(this.personForm.xingzheng_jg_id)) {
            this.$message.error("行政关系所在单位不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              xingzheng_jg_mingcheng: this.personForm.xingzheng_jg_mingcheng,
              xingzheng_jg_id: this.personForm.xingzheng_jg_id,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "tongji_jg") {
          if (!this.checkForm(this.personForm.tongji_jg_id)) {
            this.$message.error("统计关系所在单位不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              tongji_jg_mingcheng: this.personForm.tongji_jg_mingcheng,
              tongji_jg_id: this.personForm.tongji_jg_id,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "gongzi_jg") {
          if (!this.checkForm(this.personForm.gongzi_jg_id)) {
            this.$message.error("工资关系所在单位不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              gongzi_jg_mingcheng: this.personForm.gongzi_jg_mingcheng,
              gongzi_jg_id: this.personForm.gongzi_jg_id,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zhiwu_jiancheng") {
          if (!this.checkForm(this.personForm.zhiwu_jiancheng)) {
            this.$message.error("现工作单位及职务不允许为空！");
            hideLoading();
            return;
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zhiwu_quancheng: this.personForm.zhiwu_quancheng,
              zhiwu_jiancheng: this.personForm.zhiwu_jiancheng,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zyjszw") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zyjszw: this.personForm.zyjszw,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "jl") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              jl: this.personForm.jl,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "cf") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              cf: this.personForm.cf,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zwcc") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zwcc: this.personForm.zwcc,
              zwcc_dm: this.personForm.zwcc_dm,
              zwcc_sj: this.personForm.zwcc_sj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zjcc") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zjcc_mc: this.personForm.zjcc_mc,
              zjcc_dm: this.personForm.zjcc_dm,
              zjcc_sj: this.personForm.zjcc_sj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "qrzxl_zg") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              qrzxl_zg: this.personForm.qrzxl_zg,
              qrzxlxx_zg: this.personForm.qrzxlxx_zg,
              qrzxw_zg: this.personForm.qrzxw_zg,
              qrzxwxx_zg: this.personForm.qrzxwxx_zg,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zzxl_zg") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zzxl_zg: this.personForm.zzxl_zg,
              zzxlxx_zg: this.personForm.zzxlxx_zg,
              zzxw_zg: this.personForm.zzxw_zg,
              zzxwxx_zg: this.personForm.zzxwxx_zg,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "jianli") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              jianli: this.personForm.jianli,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "zhaopian") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zhaopian: this.personForm.zhaopian,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "gzjb") {
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              gzjb_dm: this.personForm.gzjb_dm,
              gzjb: this.personForm.gzjb,
            },
          };
          cadreInfoAlter(dataJsons).then((response) => {
            hideLoading();
            if (response.result) {
              that.$message.success(response.message);
            } else {
              that.$message.error(response.message);
            }
          });
        } else if (type == "zyjs") {
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              zyjs_dm: this.personForm.zyjs_dm,
              zyjs_mingcheng: this.personForm.zyjs_mingcheng,
            },
          };
          cadreInfoAlter(dataJsons).then((response) => {
            hideLoading();
            if (response.result) {
              that.$message.success(response.message);
            } else {
              that.$message.error(response.message);
            }
          });
        } else if (type == "glnx") {
          if (this.personForm.glnx) {
            const re = /^[0-9]*[1-9][0-9]*$/;
            const rsCheck = re.test(this.personForm.glnx);
            if (!rsCheck) {
              this.$message.warning("请输入正整数");
              this.personForm.glnx = "";
              return;
            }
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx: this.personForm.glnx,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glnx_qssj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx_qssj: this.personForm.glnx_qssj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glnx_kcqssj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx_kcqssj: this.personForm.glnx_kcqssj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glnx_kcjzsj") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx_kcjzsj: this.personForm.glnx_kcjzsj,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glnx_kc") {
          if (this.personForm.glnx_kc) {
            const re = /^[0-9]*[1-9][0-9]*$/;
            const rsCheck = re.test(this.personForm.glnx_kc);
            if (!rsCheck) {
              this.$message.warning("请输入正整数");
              this.personForm.glnx_kc = "";
              return;
            }
          }
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx_kc: this.personForm.glnx_kc,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glnx_shuoming") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              glnx_shuoming: this.personForm.glnx_shuoming,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "qiaojuan") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              qiaojuan: this.personForm.qiaojuan,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "sxly") {
          showLoading();
          dataJsons = {
            userId: store.getters.user_id.toString(),
            token: store.getters.token.toString(),
            system: "datacenter",
            data: {
              person_id: this.personForm.person_id,
              sxly: this.personForm.sxly,
            },
          };
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        } else if (type == "glzt_dm") {
          let glzt_dm = this.personForm.glzt_dm;
          if (glzt_dm == "0") {
            this.personForm.glzt = "暂存人员";
          } else if (glzt_dm == "1") {
            this.personForm.glzt = "现职人员";
          } else if (glzt_dm == "3") {
            this.personForm.glzt = "退休人员";
          } else if (glzt_dm == "4") {
            this.personForm.glzt = "历史人员";
          }
          showLoading();
          if (glzt_dm == "1") {
            dataJsons = {
              userId: store.getters.user_id.toString(),
              token: store.getters.token.toString(),
              system: "datacenter",
              data: {
                person_id: this.personForm.person_id,
                glzt_dm: this.personForm.glzt_dm,
                tuichushijian: null,
                tuichufangshi_dm: "",
                tuichufangshi_mingcheng: "",
                tuichufangshi_banben: "",
                tuichuquxiang: "",
              },
            };
          } else {
            dataJsons = {
              userId: store.getters.user_id.toString(),
              token: store.getters.token.toString(),
              system: "datacenter",
              data: {
                person_id: this.personForm.person_id,
                glzt_dm: this.personForm.glzt_dm,
              },
            };
          }
          cadreInfoAlter(dataJsons)
            .then((response) => {
              hideLoading();
              if (response.result) {
                that.$message.success(response.message);
              } else {
                that.$message.error(response.message);
              }
            })
            .catch(() => {
              hideLoading();
            });
        }
      }
    },
  },
};
</script>
<style scoped>
/deep/ .el-tabs__header {
  margin: 0;
}

/deep/ .el-card__body {
  padding: 0;
  height:100%;
}

/deep/ .el-popper {
  box-shadow: 5px 5px 12px 7px rgba(23, 21, 21, 0.5) !important;
}

/deep/ .el-table--border {
  border: solid 1px #e6e6e6;
}

/deep/ .el-tabs__item.is-active {
  background-color: #bedeff;
}

/deep/ .ltp-table textarea {
  border: 0px;
}

.ltp-table >>> .el-input__inner {
  border: 0px;
}

.ltp-table tr td div span span i {
  font-size: 25px;
  color: blue;
}

/deep/ .el-dialog .el-dialog__body {
  padding: 1px 0 0 0;
  overflow: auto;
}

.ltp-table {
  margin-top: 8px;
}

.ltp-table tr td {
  text-align: left;
  /*padding: 0 5px 0 5px;*/
  border: solid 1px #74a6cc;
  position: relative;
}

.ltp-table tr td input:-moz-placeholder,
textarea:-moz-placeholder {
  color: black;
}

.ltp-table tr th {
  background-color: #c0dcf2;
  font-size: 15px;
  font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
  font-weight: bold;
  border: solid 1px #74a6cc;
}

.ltp-table tr {
  height: 50px;
}

.ltp-table th {
  width: 105px;
  text-align: center;
  padding: 0;
}

.ltp-table-right {
  background-color: #d6e3f3;
}

.ltp-table-right tr td {
  text-align: left;
  padding: 0 5px 0 5px;
  border: 0;
  position: relative;
}

.ltp-table-right tr th {
  background-color: #d6e3f3;
  font-size: 15px;
  border: 0;
}

.ltp-table-right tr {
  height: 46px;
}

.ltp-table-right th {
  width: 130px;
  text-align: center;
  padding: 0;
}

/deep/ .el-tabs--border-card > .el-tabs__content {
  padding: 0;
}

/deep/ .dialog-footer {
  margin: 0 10px 10px 0;
}

/deep/ .el-dialog__footer {
  padding: 0 0 1px 0;
}

.ltpmust:before {
  content: "";
  margin-top: -24px;
  margin-left: 57px;
  position: absolute;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent red transparent;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.ltpInputAudit:before {
  position: absolute;
  left: 0;
  top: 49px;
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(246, 232, 158, 0.5);
  content: attr(data-text);
  transition: all 1s ease;
  transform: translateY(-100%);
  color: #fff;
}

.ltpInputAudit >>> .el-input__inner {
  background-color: rgba(246, 232, 158, 0.1);
}

.ltpInputLook:after {
  position: absolute;
  left: 0;
  top: 49px;
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  content: attr(data-text);
  transition: all 1s ease;
  transform: translateY(-100%);
  color: #fff;
}

.ltpInputLook input textarea {
  /*pointer-events:none;*/
  cursor: not-allowed;
}

.ltpAudit {
  background-color: rgba(255, 255, 255, 0.5);
}

.ltpAudit >>> .el-input__inner {
  background-color: rgba(255, 255, 255, 0.1);
}

.ltpAudit >>> .el-textarea__inner {
  background-color: rgba(255, 255, 255, 0.1);
}

.ltpLook {
  background-color: rgba(246, 246, 226, 0.5);
}

.ltpLook >>> .el-input__inner {
  background-color: rgba(246, 246, 226, 0.1);
}

.ltpLook >>> .el-textarea__inner {
  background-color: rgba(246, 246, 226, 0.1);
}
</style>
